Skip to content
terminal

GitHub Action

KubeCommands v1.28.4

1.28.4 Latest version

KubeCommands v1.28.4

terminal

KubeCommands v1.28.4

Use bitnami's 1.28.4 kubectl and Helm with your Github actions

Installation

Copy and paste the following snippet into your .yml file.

              

- name: KubeCommands v1.28.4

uses: Madfoat/[email protected]

Learn more about this action in Madfoat/KubeCommands

Choose a version

Github Action for Kubernetes CLI (Kubectl and helm)

This action provides kubectl v1.28.4 and helm for Github Actions.

Usage (kubectl)

In your workflow, here is an example that deploys your new image and verifies it is successful.

on: push
name: Deploy
jobs:
  deploy:
    name: Deploy to cluster
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Deploy to cluster
      uses: Madfoat/[email protected]
      with:
        kube_config: ${{ secrets.kube_config }}
        action: kubectl
        command: set image --record deployment/<my-deploy> <my-container>=<my-image>:<new-tag>
    - name: Verify deployment
      uses: Madfoat/[email protected]
      with:
        kube_config: ${{ secrets.kube_config }}
        action: kubectl
        command: '"rollout status deployment/<my-deploy>"'

Usage (helm)

In your workflow, here is an example that installs a helm release.

on: push
name: Deploy
jobs:
  deploy:
    name: Deploy to cluster
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Deploy to cluster
      uses: Madfoat/[email protected]
      with:
        kube_config: ${{ secrets.kube_config }}
        action: helm
        command: upgrade --install -n <NameSpace> <Release> <Chart>

Kube configuration

Make sure to base64-encode your kubeconfig file and put it in a github secret. You can get the string by running:

cat $HOME/.kube/config | base64

Referance

Kubectl packaged by Bitnami Apache License Version 2.0