Running Jenkins in Kubernetes
Learn how to install and manage Jenkins within a Kubernetes cluster using a YAML manifest or a Helm chart, and how to configure a pool of on-demand agents.
What you'll learn
Jenkins and Kubernetes are like two peas in a pod. They're meant to be deployed together. In this course, Running Jenkins in Kubernetes, you'll learn how to set up a Kubernetes cluster with Jenkins running inside. First, you'll deploy a Jenkins controller using a YAML manifest. Next, you'll install the Kubernetes plugin and configure a pool of on-demand agents. Each job gets its own agent pod. Then, you'll define jobs that run multiple containers (tools) inside the pod. Finally, you'll learn how to fully automate a Jenkins deployment using the official Helm chart with the Jenkins Configuration as Code plugin. When you are finished with this course, you'll have the skills and knowledge to run Jenkins with Kubernetes and to exploit the benefits of modern containerization in your CI/CD pipelines.
Table of contents
- minikube start 2m
- Creating the Jenkins Namespace 2m
- Jenkins via a StatefulSet 3m
- Running and Connecting to Jenkins 2m
- Provisioning the PersistentVolume for /var/jenkins_home 2m
- initialAdminPassword via the HostPath Directory 2m
- What Happens if the Pod Fails? 2m
- Reclaim Policy Defaults to Delete 1m
- Adding a "retained" StorageClass 2m
- Disable Executors on the Controller 2m
- Nuke Everything, Nothing Is Lost! 1m
- Custom Pod Template in a Declarative Pipeline 2m
- Adding a Maven Container 1m
- container() - Run mvn in the Maven Container 2m
- podTemplate() in a Scripted Pipeline 2m
- Checkout a Git Repo into the Pod's Workspace 2m
- A JDK Container with the Eclipse Temurin Image 1m
- Exec into the Pod to Inspect the Workspace 2m
- Run the Capture Stage 2m
- DSLs: containerTemplate() + persistentVolumeClaim() 1m
- Pod Is Pending until pvc Is Created 2m
- Multiple Parallel Containers in a Pod 2m
- Multiple Parallel Pods! 2m
- Kill Lingering Pods with terminationGracePeriodSeconds 2m
- Switching to a New Minikube Cluster 1m
- Adding the Jenkins Repo to Helm 2m
- Reinstall into the Jenkins Namespace 2m
- Installing a Second Jenkins Instance 1m
- Kubernetes Agent Pods out of the Box 1m
- Review Resources Created 4m
- ConfigMaps Define How to Bootstrap Jenkins 2m
- Specifying Additional Plugins 2m
- Updating Chart Values to Add Plugins 1m
- Changing the Admin Password 2m
- Use the Dark Theme via JCasC 2m
- /var/jenkins_home/casc_configs 1m
- The Multi Container Jenkins Controller Pod 2m
- Seeding a Pipeline Job 3m
- Finale - Fully Configured on First Install! 1m