home / containers / k3d

k3d

6.3k

CLI for creating and managing local k3s Kubernetes clusters in Docker, including kubeconfig, image import, and registry workflows.

$curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
Language
Go
Stars
6,294
Category
Containers & K8s
Agent
Ready
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis

k3d is a CLI for running k3s Kubernetes clusters as Docker containers on one machine. It is mainly a fast local control surface for spinning clusters up and down, wiring access, and shaping repeatable dev or test environments.

What It Enables
  • Create single-node or multi-node local k3s clusters, start or stop them, and delete them when a test or debugging run is done.
  • Merge or write kubeconfig for those clusters, create or attach local registries, and import container images without pushing to a remote registry first.
  • Define cluster shape in YAML config files, validate or migrate that config, and reuse the same setup across local development, CI, or agent-run test loops.
Agent Fit
  • Well suited to local inspect-change-verify loops because cluster lifecycle commands are explicit, non-TUI, and easy to script around Docker plus kubectl.
  • Structured output exists, but only on part of the surface: version supports JSON and cluster, node, and registry list support -o json|yaml, while most create or mutate commands log human-oriented progress.
  • Best when an agent needs disposable Kubernetes environments on a machine it already controls, not when it needs full cluster introspection without follow-up tools.
Caveats
  • Requires a working Docker runtime, and practical use usually also depends on kubectl plus whatever manifests or tooling you run inside the cluster.
  • k3d is community-run rather than an official Rancher or SUSE CLI, and its config format is still documented as alpha and subject to change.