Installing Kubernetes with kind

Use kind to spin up single-node and multi-node Kubernetes clusters inside Docker for fast testing and learning.

What Is kind?

kind stands for Kubernetes IN Docker. It runs Kubernetes nodes as Docker containers, which makes it fast and very convenient for local testing and CI pipelines.

Think of kind as a portable lab kit. Instead of booting full virtual machines, it builds a cluster from Docker containers.

Install kind

macOS

brew install kind

Linux

curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind

Windows

choco install kind

Create a Single-Node Cluster

kind create cluster --name demo

Create a Multi-Node Cluster

Save a config file such as kind-multi-node.yaml.

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: demo-multi
nodes:
  - role: control-plane
  - role: worker
  - role: worker

Then create the cluster:

kind create cluster --config kind-multi-node.yaml

A More Detailed kind Config

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
  apiServerAddress: 127.0.0.1
  apiServerPort: 6443
nodes:
  - role: control-plane
    extraPortMappings:
      - containerPort: 30080
        hostPort: 8080
        protocol: TCP
  - role: worker
  - role: worker

This config gives you a control-plane node, two workers, and a port mapping that is useful for demos.

Load a Local Image into kind

If you build a Docker image locally, kind will not automatically see it inside the cluster.

docker build -t demo-app:1.0 .
kind load docker-image demo-app:1.0 --name demo

That is very helpful when testing images without pushing them to a remote registry.

Delete a Cluster

kind delete cluster --name demo

Why Teams Like kind

  • Fast startup and teardown
  • Easy to use in CI pipelines
  • Great for multi-node experiments
  • Close enough to real Kubernetes for manifest validation and workflow practice

When kind Is Better Than Minikube

kind is often the better choice when you care about speed, automation, and repeatable test environments. Minikube is often more beginner-friendly when you want extras like the dashboard and a simpler guided experience.

Exercise

kind Meaning

What does kind stand for?

Exercise

Local Images

Why might you run `kind load docker-image demo-app:1.0 --name demo`?

Continue Learning

Explore Related Topics

Try the Tool

Related Resources