← All notes

Docker Buildx Kubernetes driver: run BuildKit pods in a cluster

Answer: The Kubernetes driver lets you connect your local development also or CI environments to builders in a Kubernetes cluster also to allow access to more powerful compute resources, optionally on multiple native architectures.

Create the builder

A typical create command is docker buildx create --bootstrap --name=kube --driver=kubernetes, plus --driver-opt for driver-specific settings.

Scaling and load balancing

namespace sets the Kubernetes namespace, defaulting to the namespace in the current Kubernetes context. replicas defaults to 1 and sets the number of Pod replicas to create.

default-load is false by default. default-load can automatically load images to the Docker Engine image store. The timeout is 120s before a build.

rootless starts at false and runs the container as a non-root user. loadbalance starts at sticky, or you can choose random. Under sticky, the pod is chosen from a hash of the context path.

Increasing replicas lets you use multiple nodes. random selects random nodes from the node pool. sticky, the default, connects the same build to the same node for better local cache use.

Storage, scheduling, and QEMU

persistent-volume-claim.requests.storage puts the BuildKit cache on a PVC rather than the pod disk. With that option set, Buildx builds a StatefulSet rather than a Deployment.

Combined with replicas, each replica gets its own claim, so the cache stays with that pod across restarts. One example uses 20Gi of persistent storage per replica.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Kubernetes driver; Docker, Inc., Kubernetes driver (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Kubernetes driver; Docker, Inc., Kubernetes driver (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc.

Cite this

Permanent ID: iil:note:kk5k5bnk

iinventedlight. 2026. "Docker Buildx Kubernetes driver: run BuildKit pods in a cluster." iinventedlight Library, iil:note:kk5k5bnk, version of 2026-11-27. https://iinventedlight.com/library/notes/docker-build-builders-drivers-kubernetes/. License: CC-BY-4.0.

@misc{iil_note_kk5k5bnk,
  author = {{iinventedlight}},
  title = {{Docker Buildx Kubernetes driver: run BuildKit pods in a cluster}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-27},
  url = {https://iinventedlight.com/library/notes/docker-build-builders-drivers-kubernetes/},
  note = {Permanent ID iil:note:kk5k5bnk. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/docker-build-builders-drivers-kubernetes.md.