Cloud Native 8 min read

Deploy Jenkins on Kubernetes with Helm: A Step‑by‑Step Guide

This tutorial walks you through using Helm to download the Jenkins chart, pull and retag required Docker images, configure a custom values file, install Jenkins on a Kubernetes cluster, verify the deployment, and understand the benefits of Helm for streamlined CI/CD automation.

Linux Ops Smart Journey
Linux Ops Smart Journey
Linux Ops Smart Journey
Deploy Jenkins on Kubernetes with Helm: A Step‑by‑Step Guide

Download Jenkins Chart

Add the official Jenkins Helm repo, pull the chart version 5.8.37 and push it to a private OCI registry.

$ helm repo add jenkinsci https://charts.jenkins.io --force-update
$ helm pull jenkinsci/jenkins --version 5.8.37
$ helm push jenkins-5.8.37.tgz oci://core.jiaxzeng.com/plugins

Pull Official Images

Retrieve required Docker images, retag them to the private registry, and push.

sudo docker pull jenkins/inbound-agent:3307.v632ed11b_3a_c7-2
sudo docker tag jenkins/inbound-agent:3307.v632ed11b_3a_c7-2 core.jiaxzeng.com/library/jenkins/inbound-agent:3307.v632ed11b_3a_c7-2
sudo docker push core.jiaxzeng.com/library/jenkins/inbound-agent:3307.v632ed11b_3a_c7-2

sudo docker pull docker.io/kiwigrid/k8s-sidecar:1.30.3
sudo docker tag docker.io/kiwigrid/k8s-sidecar:1.30.3 core.jiaxzeng.com/library/jenkins/k8s-sidecar:1.30.3
sudo docker push core.jiaxzeng.com/library/jenkins/k8s-sidecar:1.30.3

sudo docker pull docker.io/jenkins/jenkins:2.492.3-jdk21
sudo docker tag docker.io/jenkins/jenkins:2.492.3-jdk21 core.jiaxzeng.com/library/jenkins/jenkins:2.492.3-jdk21
sudo docker push core.jiaxzeng.com/library/jenkins/jenkins:2.492.3-jdk21

sudo docker pull docker.io/bats/bats:1.11.1
sudo docker tag docker.io/bats/bats:1.11.1 core.jiaxzeng.com/library/jenkins/bats:1.11.1
sudo docker push core.jiaxzeng.com/library/jenkins/bats:1.11.1

Configure Jenkins Values

Create a jenkins-values.yaml file with overrides, controller image registry, sidecar settings, plugins, ingress, persistence, and Java options as shown.

fullnameOverride: jenkins
controller:
  image:
    registry: core.jiaxzeng.com
    repository: library/jenkins/jenkins
  sidecars:
    configAutoReload:
      enabled: true
      image:
        registry: core.jiaxzeng.com
        repository: library/jenkins/k8s-sidecar
installPlugins:
  installLatestPlugins: false
ingress:
  enabled: true
  apiVersion: networking.k8s.io/v1
  annotations:
    cert-manager.io/cluster-issuer: ca-cluster-issuer
  ingressClassName: nginx
  hostName: jenkins.jiaxzeng.com
  tls:
    - secretName: jenkins.jiaxzeng.com-tls
  hosts:
    - jenkins.jiaxzeng.com
javaOpts: "-Djava.awt.headless=true -Dhudson.model.DownloadService.noSignatureCheck=true"
persistence:
  enabled: true
  storageClass: ceph-fs-storage
  accessMode: ReadWriteMany
  size: 8Gi

Deploy Jenkins

Install the chart in the jenkins namespace using the prepared values file.

$ helm -n jenkins install jenkins --create-namespace -f /etc/kubernetes/addons/jenkins-values.yaml /etc/kubernetes/addons/jenkins

After deployment, retrieve the admin password and access the UI at https://jenkins.jiaxzeng.com.

Verification

Check resources with kubectl -n jenkins get sts,pod,service,pvc,ingress and confirm the Jenkins UI loads correctly.

Jenkins UI
Jenkins UI

Conclusion

The guide demonstrates how Helm simplifies Jenkins deployment on Kubernetes, improving efficiency and easing future upgrades.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Cloud NativeDeployment
Linux Ops Smart Journey
Written by

Linux Ops Smart Journey

The operations journey never stops—pursuing excellence endlessly.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.