talira

Little helper to run CNCF's k3s in Docker

open sourceMITself-hostablefree

k3d is a lightweight wrapper that runs K3s clusters inside Docker containers, so one machine can run a single-node or multi-node Kubernetes cluster for local development and CI. One command creates or deletes a cluster, with servers, agents and a load balancer as containers, and it needs Docker v20.10.5 or later and kubectl to talk to the cluster. Support for Podman instead of Docker is experimental. It's a community-driven project, not an official Rancher (SUSE) product, under the MIT licence.

Ways to install

Problems it solves

  • spin up a multi-node cluster on my laptop in seconds using only Docker
  • create and throw away a lightweight cluster in each CI job to test my Helm charts
  • hot-reload my app while developing against a local cluster
  • a local cluster that starts much faster and uses less memory than a full VM-based one
  • run several separate test clusters side by side on one machine
  • use a local image registry with my throwaway development cluster
  • simulate a highly available control plane with several servers on one laptop
  • define my local cluster in a config file so the whole team gets the same setup

Features

  • create, start, stop and delete k3s clusters as Docker containers
  • single-node and multi-server, multi-agent clusters on one machine
  • requires Docker v20.10.5 or later (runc v1.0.0-rc93 or later) for k3d v5
  • experimental Podman support (Podman v4 or later)
  • install script, Homebrew, AUR, Chocolatey, Scoop, arkade, asdf or go install
  • examples for hot reloading, Tilt build-deploy-test cycles and Drone CI

Limitations

  • Podman support is experimental: k3d says it isn't guaranteed to work with Podman, and rootless Podman needs extra cgroup delegation3

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what k3d does.

  1. kind Run local Kubernetes clusters using Docker container nodes
  2. minikube Run a local Kubernetes cluster on macOS, Linux and Windows
  3. MicroK8s Zero-ops, pure-upstream, HA Kubernetes, from developer workstations to production
  4. OpenShift Local A minimal OpenShift Container Platform 4 cluster on your local computer

Compare k3d with the top 3