How do you build container images inside Kubernetes agents without Docker?
AdvancedConceptPlugins, JCasC & Jenkins on Kubernetes
Answer
Mounting the node's Docker socket gives every build root on the node and does not work on containerd-only clusters. Daemonless options:
- Kaniko (
executor:debugimage): builds from a Dockerfile in user space; the original Google project was archived in 2025, maintained forks exist. - BuildKit rootless (
moby/buildkit:rootlesswithbuildctl-daemonless.sh), or a shared BuildKit deployment. - Buildah in rootless mode.
Each still runs as a privileged-ish workload in some form, so isolate builder pods on dedicated nodes.
More on Plugins, JCasC & Jenkins on Kubernetes
How do you manage plugins in a reproducible way?IntermediateWhat does `jenkins-plugin-cli` resolve for you, and what flags matter?IntermediateWhy should you keep the number of plugins low?BeginnerWhat is JCasC and how is it loaded?BeginnerWhat are the top-level root elements in a JCasC file?IntermediateHow do you inject secrets into JCasC without committing them?Advanced