Difficulty: Introduction
Estimated Time: 20 minutes

Jenkins on Kubernetes


Canary Releases with Jenkins on Kubernetes

This demonstration covers these topics:

  • A personal Kubernetes cluster
  • Install and configure Jenkins from Helm chart
  • Installing Prometheus from Helm chart
  • Demonstrating Kubernetes plugin for Jenkins
  • Build, deploy and run container from Jenkinsfile
  • Update container with canary deployment
  • Monitoring canary deployments
  • Rollback canary

Canary release is a technique to reduce the risk of introducing a new software version in production by slowly rolling out the change to a small subset of users before rolling it out to the entire infrastructure and making it available to everybod. - MartinFowler.com

Instructions Overview

  • Start a personal Kubernetes cluster
  • Create a Quay.io robot account and copy the credentials
  • Install Jenkins on the cluster
  • Configure Jenkins to leverage Kubernetes
  • Create a pipeline that builds on and publishes to Kubernetes
  • Roadmap: Add Prometheus-Operator monitoring stack from Helm charts
  • Roadmap: Observe monitoring of a deployed container
  • Roadmap: See how canary deployments work with this workflow

Jenkins is an open source automation server written in Java. Jenkins helps to automate the non-human part of the software development process, with continuous integration and facilitating technical aspects of continuous delivery. It is a server-based system that runs in servlet containers such as Apache Tomcat. It supports version control tools, including AccuRev, CVS, Subversion, Git, Mercurial, Perforce, ClearCase and RTC, and can execute Apache Ant, Apache Maven and sbt based projects as well as arbitrary shell scripts and Windows batch commands. The creator of Jenkins is Kohsuke Kawaguchi. Released under the MIT License, Jenkins is free software.


You now understand fundamentally how Jenkins can run on Kubernetes. Jenkins runs the pipelines while it leverages Kubernetes to schedule the agents and to keep the engine running. Hopefully, you also understand how Kubernetes is a new type of data center operating system that can run your applications - across multiple nodes on your local laptop, a rack of servers, or any cloud target.

Technology stack

This demonstration was performed with these tools. Newer versions may exist.

  • Kubernetes
  • Kubectl
  • Helm
  • Prometheus Operator
  • Kube-Prometheus (Alertmanager + Grafana)
  • Python
  • See jenkins-value.yaml file for Jenkins version and its plugins




No Fluff Just Stuff

For a deeper understanding of these topics and more join me, Jonathan Johnson, for a transcendent experience on the No Fluff Just Stuff Software Symposium Tour.


Step 1 of 5

Your Kubernetes Cluster

For this scenario, Katacoda has just started a fresh Kubernetes cluster for you. Verify it's ready for your use.

&& kubectl get componentstatus

The Helm package manager used for installing applications on Kubernetes is also available.

helm version --short

Kubernetes Dashboard

You can administer your cluster with the kubectl CLI tool or use the visual Kubernetes Dashboard. Use this script to access the protected Dashboard.


Kubernetes Dashboard
Jenkins Portal