k3d
Lightweight utility to run Rancher Lab’s k3s in Docker containers.
Why consider k3d?
k3d is a lightweight wrapper that runs k3s Kubernetes clusters inside Docker. It makes it fast and effortless to spin up single and multi-node Kubernetes clusters for local development and CI pipelines.
Learn k3d by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide2 sections
Overview of k3d
k3d packages lightweight k3s Kubernetes clusters into Docker containers. Because nodes run as Docker containers, creating, scaling, and deleting multi-node clusters takes only a few seconds without heavy virtual machine overhead.
Creating a Multi-Node Cluster
Install k3d via the install script:
wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bashCreate a 3-node cluster with port mapping to localhost:
k3d cluster create mycluster --servers 1 --agents 2 -p "8080:80@loadbalancer"Verify your cluster nodes:
kubectl get nodesTo stop and delete the cluster:
k3d cluster delete myclusterk3d is released under the permissive MIT License.
Related tools
More options with a similar category or technology profile.
diskus
Minimal, fast alternative to du -sh written in Rust using multi-threaded directory traversal.
peco
Simplistic interactive filtering tool for Unix pipelines, process lists, and file trees.
Dapr CLI
Command-line tool for managing Dapr distributed application runtime environments and sidecars.
Freeze
Generate beautiful image screenshots and SVGs of code snippets and terminal outputs.