Skip to Content
Kubernetes Cookbook - Second Edition
book

Kubernetes Cookbook - Second Edition

by Hideto Saito, Hui-Chuan Chloe Lee, Ke-Jou Carol Hsu
May 2018
Intermediate to advanced
554 pages
13h 51m
English
Packt Publishing
Content preview from Kubernetes Cookbook - Second Edition

Launching the Jenkins server via Kubernetes deployment

Based on the previous recipes, now you have:

  • A custom Jenkins container image
  • A service account

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Kubernetes Cookbook

Kubernetes Cookbook

Sébastien Goasguen, Michael Hausenblas
DevOps with Kubernetes - Second Edition

DevOps with Kubernetes - Second Edition

Hideto Saito, Hui-Chuan Chloe Lee, Cheng-Yang Wu

Publisher Resources

ISBN: 9781788837606Supplemental Content