CI is a very interesting area where Kubernetes can be applied. It's a common use case to have a demand of containers to be able to run tests of code changes, or to create some build artifacts. In this post I will be explaining how to use Kubernetes to spin up Jenkins slaves and connect them to a Jenkins master, allowing to run tests on demand, and have a very easy and fast way to scale depending on our needs. Pre-requisites needed on Jenkins master Installing Jenkins plugin This approach relies on Jenkins Swarm Plugin. So you need to ensure that you have installed this module on your master: https://wiki.jenkins-ci.org/display/JENKINS/Swarm+Plugin For Jenkins Swarm Plugin to work, you need to enable CSRF. You need to visit http://url.to.master/configureSecurity/ and check the Prevent Cross Site Request Forgery exploits option. Configure security Also consider that Jenkins uses a random port to enable connection to slaves using JNLP. If you are under a protected e...