Deploying Helm Charts to a Kubernetes server from Jenkins Deploying Helm Charts to a Kubernetes server from Jenkins kubernetes kubernetes

Deploying Helm Charts to a Kubernetes server from Jenkins


What we use in our CI is completely skip anyfunky Jenkins plugins and just go for the native tooling. We bake kubectl/helm into the jenkins/worker image provide credentials to them so they can speak to the cluster and then take the private Helm chart not from published charts, but directly from private git repo holding that chart. And then we simply run helm against this localy cloned chart with a usual script step.

Example of kube config part defining the ca cert (related to comment below):

apiVersion: v1clusters:- cluster:    certificate-authority-data: <base64 ca cert>    server: https://cluster_api_url  name: mycluster


We're working on an open source project called Jenkins X which is a proposed sub project of the Jenkins foundation aimed at automating CI/CD on Kubernetes using Jenkins and GitOps for promotion.

We worked around some of the issues you've been having by running the Jenkins pipelines inside the kubernetes cluster; so there's no need to authenticate with the kubernetes cluster - it just reuses the existing RBAC.

When you merge a change to the master branch, Jenkins X creates a new semantically versioned distribution of your app (pom.xml, jar, docker image, helm chart). The pipeline then automates the generation of Pull Requests to promote your application through all of the Environments via GitOps.

Here's a demo of how to automate CI/CD with multiple environments on Kubernetes using GitOps for promotion between environments and Preview Environments on Pull Requests - using Spring Boot and nodejs apps (but we support many languages + frameworks).