cuzfrog / install-kubectl

Github Action to install kubectl and run

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

test workflow

Setup kubectl in Github Actions

This action provides kubectl for GitHub Actions.

Usage

- name: deploy to cluster
  uses: cuzfrog/install-kubectl@v1
  with: # defaults to latest kubectl binary version
    config: ${{ secrets.KUBE_CONFIG_DATA }}
    version: v1.21.6
    run: |
      kubectl apply -f my-app.deployment.yml
      kubectl rollout status deployment/my-app

Arguments

runrequired: The script you want to run, e.g. kubectl get pods.

configrequired: A base64-encoded kubeconfig file with credentials for Kubernetes to access the cluster. You can get it by running the following command:

cat kube.config | base64

version: The kubectl version with a 'v' prefix, e.g. v1.21.0. It defaults to the latest kubectl binary version available.

TODO

  • outputs for kubectl install path. So it can possibly be reused in a later step.

Author

Cause Chung cuzfrog@gmail.com

About

Github Action to install kubectl and run

License:MIT License


Languages

Language:Shell 67.7%Language:Dockerfile 32.3%