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
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:
versionsupports JSON andcluster,node, andregistry listsupport-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
kubectlplus 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.