Jenkins: K8S


Deploying Jenkins on K8S cluster is as simple as

Add Repo

helm repo add jenkins
helm repo update

Deploy instance

helm upgrade --install myjenkins jenkins/jenkins -n jenkins --create-namespace

On my local machine the output is as under

Release "myjenkins" does not exist. Installing it now.
NAME: myjenkins
LAST DEPLOYED: Wed Feb  2 10:20:57 2022
NAMESPACE: jenkins
STATUS: deployed
1. Get your 'admin' user password by running:
  kubectl exec --namespace jenkins -it svc/myjenkins -c jenkins -- /bin/cat /run/secrets/chart-admin-password && echo
2. Get the Jenkins URL to visit by running these commands in the same shell:
  kubectl --namespace jenkins port-forward svc/myjenkins 8080:8080

3. Login with the password from step 1 and the username: admin
4. Configure security realm and authorization strategy
5. Use Jenkins Configuration as Code by specifying configScripts in your values.yaml file, see documentation: http:///configuration-as-code and examples:

For more information on running Jenkins on Kubernetes, visit:

For more information about Jenkins Configuration as Code, visit:

NOTE: Consider using a custom image with pre-installed plugins

I will deploy it over ingress to be used over the web

The password for the admin can be extracted

kubectl exec --namespace jenkins -it svc/myjenkins -c jenkins -- /bin/cat /run/secrets/chart-admin-password && echo

Leave a Reply

Your email address will not be published. Required fields are marked *