K3d

No Change
assess
First Added:October 1, 2024 Updated: July 7, 2026

K3d is a CLI that runs k3s clusters inside Docker containers for fast local Kubernetes development. We assess it when you need a production-like API on a laptop without provisioning cloud control planes.

Blurb

k3d is a lightweight wrapper to run k3s(Rancher Lab’s minimal Kubernetes distribution) in docker.

Summary

When to use:

UseNotes
Local K8s devSpin up single- or multi-node k3s clusters in seconds
CI smoke testsEphemeral clusters in GitHub Actions via k3d-action
Helm and manifest workExercise charts and YAML against a real API before cloud apply
Low resource footprintk3s targets edge and dev; lighter than full distro clusters

When to skip:

  • Production or shared staging (use managed Kubernetes such as Google GKE)
  • Teams standardized on kind or minikube with existing docs and scripts
  • Environments without Docker (k3d requires a Docker engine)
  • GUI-first Mac/Windows dev where Rancher Desktop k3s mode is already adopted

Trade-offs: Community-driven, not an official Rancher/SUSE product. k3s differs slightly from upstream Kubernetes; validate CRDs and APIs you depend on.

Details

Quick Start

1
2
k3d cluster create dev
kubectl cluster-info

Add agents with --agents N or extra servers with --servers N for multi-node topology tests.

Requirements

TopicNotes
DockerRequired; k3d v5.x needs Docker 20.10.5+ (runc 1.0.0-rc93+)
kubectlSeparate install; k3d writes kubeconfig context
PortsAPI exposed on a host port chosen by k3d; load balancer container fronts server nodes

Features Worth Knowing

FeatureNotes
Image importLoad local images into cluster without a registry push
Registry mirrorRun an embedded registry for fast iteration
Config fileReproduce cluster shape from YAML for team sharing
Multi-clusterSeveral k3d clusters on one Docker host

Compared to Alternatives

OptionWhen k3d winsWhen the alternative wins
Rancher DesktopScriptable CLI, CI, disposable clustersGUI k3s toggle and integrated engine on Mac/Windows
kind (not in garden)k3s footprint, Rancher ecosystem familiarityUpstream conformance testing against vanilla K8s
minikube (not in garden)Faster multi-node in DockerBuilt-in drivers for VM-based local clusters

CI and Tooling

References