Installing Jenkins On your Kubernets Cluster By Using Helm Charts

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

I was in a need for a quick CI/CD application, I decided to try and take Jenkins (master) for a ride.

Below I will show you, how you can quickly install Jenkins by using the Jenkins Helm Chart.
Note: I am also using MetalLB (which I am a big fan of) to exposed a public IP address, more on how to configure MetalLB can be seen here and the MetallB home page is here.

The below example configuration uses the following versions:

  1. CoreOS: 2163.2.1
  2. Kubernetes client(kubectl):v1.13.1
  3. Kubernetes:v1.13.2
  4. Helm:v2.12.3
  5. Jenkins Helm chart:1.1.23
  6. Metal LB(optional):0.8.4

First lets get a starting/default Jenkins configuration.

You can inspect all the default settings and if required overwrite them in your own values.yaml file. (as I will be doing below).
Note: For a list of available settings you can look here at their official GitHub page.

Next, lets prepare persistence storage that Jenkins will use and is now required at install time.
cat jenkins-storage-class.yaml

Now, lets create the volume
cat jenkins-vol.yaml

Lastly, lets create / prepare the Volume Claim.
cat jenkins-pvc.yaml

Now, we are ready to install helm.

Overwrite configuration properties
cat helm/jenkins-values.yml

Verify deployment.

If all worked correctly, you should see something like the below output.

To get the Jenkins admin password, run the below.

Checking for issues – Troubleshooting
One of the issues I had was being behind a corporate proxy/firewall.
Jenkins by default will try to install a list of plugins at install time, which if it fails/timeout will cause the install to not complete and fail.

To get around this issue, you have two options.

  1. Add an empty install plugins list. you do so by adding a line installPlugins: to your helm/jenkins-values.yml with no entry
  2. Add your proxy to the helm/jenkins-values.yml (like the configuration above)

To see cause of the issue, you can use docker (or kubectl logs …).
For example in my case, the below error was shown.

And the corresponding pod showed the below issue (timeout).

The full list of Jenkins Helm Chart Available Properties is available here

Like what you’re reading? please provide feedback, any feedback is appreciated.

You might also like – realted to Docker Kubernetes / micro-services.

Leave a Reply

1 Comment threads
1 Thread replies
Most reacted comment
Hottest comment thread
2 Comment authors
Eli KleinmanPAVEL GLAGOLEV Recent comment authors
newest oldest most voted
Notify of

I have the same problem. Did you manage to fix this problem?