May 2018
Intermediate to advanced
554 pages
13h 51m
English
Based on the previous recipes, now you have:
Finally, you can launch your custom Jenkins server on your Kubernetes cluster. Remember that we need to run a docker command in the Docker environment, which needs to mount /var/run/docker.sock from the local Kubernetes node.
In addition, we need to use a jenkins-sa service account to launch a Jenkins pod. It needs to specify spec.template.spec.serviceAccountName: jenkins-sa in the deployment configuration.
It is also recommended to have a PersistentVolume to preserve Jenkins home (/var/jenkins_home), in case a pod is restarted. We just simply use the hostPath /data/jenkins-data directory ...