Giter Club home page Giter Club logo

kubectl-helm-action's Introduction

kubectl-helm-action

Page Views Count

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

☕️ Buy me a coffee

https://www.paypal.me/junvzhao

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

Switch versions

You can switch to different helm version by using different tags, current the master branch uses helm 3.13

Thanks

This repo is inspired by steebchen/kubectl, thanks.

kubectl-helm-action's People

Contributors

alessioerosferri avatar lltr avatar mikemonteith-livi avatar wahyd4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kubectl-helm-action's Issues

[Feature] - kubeconfig from the File path

It should have :

Environment
KUBECONFIG_FILE: Kubeconfig file for Kubernetes cluster access.
KUBECONFIG_BASE64: Kubeconfig as base64 for Kubernetes cluster access.

This is much needed while we are using Kind cluster in Githubaction

Question: Will this action deploy helm chart to all available clusters?

Hello,

This is more a question that an issue. I would like to know if we have dev, stage, preprod, and production settings in KUBE_CONFIG_DATA, will running jobs as described in the example install (manifest.yaml or bitnami/postgresql) to all clusters defined on KUBE_CONFIG_DATA?

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.