Plugin of the Month – October 2026: Kubernetes Plugin
Welcome back to the Plugin of the Month series, where we highlight useful and impactful tools from the Jenkins ecosystem.
As Halloween approaches, Jenkins builds don’t need to haunt a fleet of idle agents. This October, we’re featuring the Kubernetes Plugin, which conjures build agents as pods in a Kubernetes cluster whenever a pipeline needs them. Teams can tailor each pod’s containers to the work at hand, then let the agents disappear when the build is done.
What is the Kubernetes Plugin?
Jenkins uses a controller-and-agent architecture: the controller schedules work, and agents run builds. The Kubernetes Plugin connects a Jenkins controller to a Kubernetes cluster and uses pod templates to provision agents when jobs need them.
A pod can contain multiple containers, so a pipeline can use the tools it needs, such as Maven, Node.js, or a deployment client, without installing every tool on a single shared agent. When a build finishes, its agent pod can be removed, freeing cluster resources for other workloads.
The plugin provisions build agents; it does not install or manage the Jenkins controller or the Kubernetes cluster.
Why Use It?
Agents on demand
The plugin creates agent pods as jobs require them, making it easier to scale build capacity with available cluster resources. Teams can avoid keeping as many idle, always-on build machines.
A Pipeline Example
The following scripted Pipeline defines a pod with a Maven container, checks out the project, and runs the build in that container:
podTemplate(yaml: '''
apiVersion: v1
kind: Pod
spec:
containers:
- name: maven
image: maven:3.9.9-eclipse-temurin-17
command:
- cat
tty: true
''') {
node(POD_LABEL) {
checkout scm
container('maven') {
sh 'mvn -B verify'
}
}
}
The Kubernetes Plugin provides the Jenkins agent connection for the pod.
The container step selects where the build command runs; other pipeline steps, such as checkout, can run in the agent’s default container.
Getting Started
-
Install the Kubernetes Plugin from Manage Jenkins → Plugins.
-
Configure a Kubernetes cloud under Manage Jenkins → Clouds, including cluster access and the connection between agents and the Jenkins controller.
-
Define pod templates in Jenkins or in your pipeline, and use them to run a test job.
For setup details and configuration options, see the Jenkins documentation on scaling Jenkins on Kubernetes and the Kubernetes Plugin page.
Plan for Your Cluster
The plugin creates pods, but the cluster still needs enough capacity to schedule them. Configure resource requests and limits for build containers, and make sure the agent images and cluster networking suit your environment. Also, give Jenkins only the Kubernetes permissions it needs, ideally scoped to a dedicated namespace.
If you want build agents that are created when needed and use containerized toolchains, the Kubernetes Plugin is a practical way to connect Jenkins pipelines to the resources and scheduling capabilities of your cluster.