Skip to content

wahyd4/kubectl-helm-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kubectl-helm-action

Page Views Count

A Github action for using kubectl and helm to deploy applications to Kubernetes cluster

How to use

Set up KUBE_CONFIG_DATA secret

Encode your kubeconfig file with base64 encoding.

cat $HOME/.kube/config | base64

Store the encoded string as a secret with name KUBE_CONFIG_DATA, by navigating to your repo -> Settings -> Secrets -> Add a new secret

Config a Github workflow

Create a workflow file .github/workflows/deploy.yaml

on: push
name: deploy
jobs:
  deploy:
    name: deploy to cluster
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: deploy to cluster
      uses: wahyd4/kubectl-helm-action@master
      env:
        KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
      with:
        args: kubectl apply -f manifest.yaml

Or you may want to deploy applications with helm

- name: deploy postgres to cluster
  uses: wahyd4/kubectl-helm-action@master
  env:
    KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
  with:
    args: |
      helm repo add bitnami https://charts.bitnami.com/bitnami
      helm upgrade --install postgres -n data bitnami/postgresql

Thanks

This repo is inspired by steebchen/kubectl, thanks.

About

A Github action for using kubectl and helm to deploy applications to Kubernetes cluster

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •