Local clusters: kind, minikube and k3d

Beginner · 36 min

Three ways to run real Kubernetes on a laptop, how each one builds its nodes, and the chores that differ: local images, exposing Services, resets and CI.

Before thisNodes, the kubelet and the container runtime

MajorBreakfast · 36 min

Local clusters: kind, minikube and k3d

The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.

Taught by MajorBreakfastReport a problem with this video
Not started
Set this lesson's status

What you'll learn

  • A local cluster is real Kubernetes with nodes that are containers or a VM on your machine. It is for learning, development and CI, not for production.
  • kind runs each node as a Docker or Podman container with upstream kubeadm inside. It is what Kubernetes' own CI uses, and it is quick to create and destroy.
  • minikube runs a node in a VM or a container, with add-ons such as ingress and metrics-server and a tunnel command for LoadBalancer Services.
  • k3d runs k3s, a slimmed single-binary distribution that uses SQLite instead of etcd by default and bundles Traefik, a service load balancer and local-path storage.
  • Locally built images are not visible to cluster nodes until you load them (kind load, minikube image load, k3d image import) or push them to a registry the nodes can reach.

A cluster you can break

Learning Kubernetes on a shared company cluster is like learning to drive on the motorway at rush hour. You want a cluster you can create in a minute, fill with half-broken YAML, and throw away. You want the same thing in CI, where every pipeline run should start from a clean, known cluster. A cloud cluster costs money and takes ten minutes to provision.

So several projects package a whole cluster, control plane and nodes, to run on one machine. They all solve the same problem from the nodes lesson: a node needs a Linux kernel, a container runtime and a kubelet. They differ in where they put that node.

kind: Kubernetes in Docker

kind (“Kubernetes IN Docker”) runs each node as a container. Inside that container are systemd, containerd and a kubelet, and the cluster is built with upstream kubeadm. Kubernetes’ own CI uses kind to test Kubernetes itself, which tells you two things: it tracks upstream closely, and it is built to be created and destroyed thousands of times a day.

kind create cluster --name dev
kubectl cluster-info --context kind-dev
kind delete cluster --name dev

Multi-node clusters come from a small config file:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
  - role: control-plane
    extraPortMappings:
      - containerPort: 30080
        hostPort: 8080
  - role: worker
  - role: worker

kind v0.33.0, released in August 2026, defaults to a kindest/node:v1.37.0 image and publishes images for 1.34 to 1.37. Its release notes ask you to pin node images by @sha256 digest. kind can also use Podman or nerdctl instead of Docker.

minikube: a node in a VM or a container

minikube is the oldest of the three and the most batteries-included. It runs a single node (multi-node is supported) using a driver: a container driver such as Docker or Podman, or a VM driver such as QEMU, VFkit on macOS or Hyper-V on Windows. A VM gives you a real, separate kernel, which matters if you want to test anything that touches kernel features.

minikube start --driver=docker --kubernetes-version=v1.37.0
minikube addons enable ingress
minikube addons enable metrics-server
minikube tunnel        # gives LoadBalancer Services an IP
minikube dashboard

The add-ons are the attraction: ingress controllers, metrics-server, a registry, storage provisioners, each one command away.

k3d: k3s in Docker

k3s is a lightweight Kubernetes distribution from Rancher, packaged as a single binary. It is fully conformant, but it makes different choices. By default a single-server k3s stores state in embedded SQLite rather than etcd; embedded etcd is used for multi-server HA. It bundles the Traefik ingress controller, a simple service load balancer (ServiceLB) and the local-path storage provisioner. k3s runs well on small machines and at the edge.

k3d runs k3s nodes as Docker containers, much as kind does for upstream:

k3d cluster create dev --agents 2 -p "8080:80@loadbalancer"
k3d image import myapp:dev -c dev
k3d cluster delete dev

The -p flag maps a host port through k3d’s own load-balancer container to the cluster’s ingress, so curl localhost:8080 reaches Traefik.

The chores that differ

All three give you kubectl access to a working cluster in under a minute or two. The differences show up in four daily chores, which is how the video compares them.

Running images you just built. Your laptop’s Docker image store is not the nodes’ image store. kind nodes and k3d nodes run their own containerd. Either load the image in (kind load docker-image myapp:dev, minikube image load myapp:dev, k3d image import myapp:dev) or run a local registry and push to it. Use a real tag, not :latest. With :latest, imagePullPolicy defaults to Always, and the kubelet ignores your loaded copy and tries the registry.

Reaching Services. A NodePort works if the node’s port is mapped to your host (kind’s extraPortMappings, k3d’s -p). A LoadBalancer needs something to hand out IPs: minikube tunnel, k3s’s ServiceLB, or for kind the separate cloud-provider-kind or MetalLB. kubectl port-forward works everywhere and is often simplest.

Resetting. Container-based nodes are fastest to delete and recreate. A VM takes longer to boot.

CI. kind and k3d are the usual choices because they need only a container runtime on the runner.

Docker Desktop and Rancher Desktop also include a one-click cluster, and Docker Desktop can now create multi-node clusters using kind. They are fine for a first look; the CLI tools give you more control over versions and configuration.

What local clusters hide

A local cluster is real Kubernetes, but every node shares one machine. Node failure, network partitions, cloud load balancers, real block storage, IAM integration and node autoscaling are faked or missing. That is fine; they are what the managed Kubernetes lesson is for.

There is also a fourth, stranger option this roadmap’s own experiments use: run only the control plane binaries, etcd and kube-apiserver plus the scheduler and controller manager, with no nodes at all. That is also how controller-runtime’s envtest tests operators. You get a real API to apply manifests against, but no Pod ever runs.

About the video

The embed is MajorBreakfast’s “Local Kubernetes Clusters - The Grand Comparison 2023” (April 2023, 36 minutes), all of it, because the comparison is the point. Its chapters walk Docker Desktop, Rancher Desktop, MicroK8s, minikube, kind and k3d through the same tasks: creating a first cluster, building and running a local image, pulling from a private registry, exposing Services as LoadBalancer and NodePort, how fast each resets (with a benchmark), CI use, and a summary table with recommendations. Its example code is on GitHub. The tool versions are from early 2023. Since then Docker Desktop has added kind-based multi-node clusters, minikube has dropped the HyperKit driver from its docs, and kind’s default is now Kubernetes 1.37, so check the commands against current docs. English was judged from the English title, description and caption track; there is no audio-track metadata. The CloudFolks video in deeper is a current, shorter survey that also places kubeadm and EKS.

What was run: nothing. No Docker, VM or container runtime is available where this lesson was written, so none of these tools could create a cluster. Commands and behaviour are from the kind, minikube, k3d and k3s docs, and versions from each project’s latest GitHub release (kind v0.33.0, minikube v1.39.0, k3d v5.9.0, k3s v1.37.2+k3s1), all checked 2026-11-28.

Where this fits

The other way to get a cluster is to rent one: managed Kubernetes on EKS, GKE and AKS.

Check yourself

  1. 01You build myapp:dev with Docker and apply a Deployment using it on a kind cluster. The Pod shows ErrImagePull. Why, and what are two fixes?

    The kind nodes are containers with their own containerd image store, which cannot see your Docker daemon's images, so they try to pull myapp:dev from Docker Hub. Run kind load docker-image myapp:dev, or push the image to a local registry the nodes are configured to use. Avoid the :latest tag, which defaults imagePullPolicy to Always.

  2. 02A teammate creates a Service of type LoadBalancer on minikube and its EXTERNAL-IP stays pending. What is missing?

    Nothing allocates load balancer IPs on a laptop. minikube tunnel runs a process that assigns one and routes to it. k3d and k3s ship a small service load balancer that does this automatically, and kind needs an extra component such as cloud-provider-kind or MetalLB.

  3. 03Your CI job needs a fresh cluster for every pipeline run to test manifests. Which tool would you reach for and why?

    kind or k3d. Both run nodes as containers, so a cluster appears in well under a minute and disappears completely when deleted. kind runs upstream Kubernetes, which matters if you test version-specific behaviour.

  4. 04What is one thing a local cluster cannot teach you about production?

    Any of: real multi-machine failure and network partitions, cloud load balancers and IAM, CSI drivers for real disks, control plane upgrades under load, or node autoscaling. Local clusters fake or skip each of these.

Go deeper

Notes

Private to you

Esc
↑↓ navigate↵ open? shortcuts

Keyboard shortcuts

Press Esc to close

Anywhere

⌘K
Search and commands
/
Search
?
This sheet
Esc
Close

Reading a lesson

J
Next lesson
K
Previous lesson
B
Bookmark