06

Multi-Node Cluster Setup with Kind

Video: Day 6/40 — Kubernetes Multi Node Cluster Setup Step By Step | Kind • https://www.youtube.com/watch?v=RORhczcOrWs • Duration: ~27 min

Key terms

TermMeaning
KindKubernetes IN Docker — runs cluster nodes as containers
Node (kind)A Docker container acting as a cluster node
Cluster configYAML defining node roles and count
Control-plane nodeNode running the control plane
ContextWhich cluster/user kubectl currently talks to
kubeconfigFile holding cluster access details

Problem & solution

Learning and testing multi-node behavior needs a cluster, but real multi-machine clusters are expensive and slow to provision. We need a cheap, fast, throwaway multi-node cluster that runs entirely on a laptop.

Solution: Run a real multi-node cluster locally with kind (each node is a Docker container) to learn and test without cloud cost.

The analogy

Instead of leasing real waterfront and pouring concrete, you build a working model port on your desk: tiny docks and a control office made of toy blocks that genuinely move cargo. kind does exactly that, standing up a real multi-node cluster on your laptop where every node is just a Docker container. The model harbor master's office is the control-plane node, the toy model docks are the worker nodes, and the desk and power strip holding it all up are the Docker engine that hosts every piece.

Where this fits in the cluster

The same cluster entities appear in every day's notes; the <== marks what this day touches.

What is Kind?

Kind = Kubernetes IN Docker. It runs each Kubernetes "node" as a Docker container. Perfect for local learning/CI — a full multi-node cluster on a laptop.

Install (macOS/Linux)

You need three tools: kind to build the cluster, kubectl to talk to it, and a running Docker engine to host the node containers.

# kind
brew install kind          # or: go install / curl binary
# kubectl
brew install kubectl
docker --version           # Docker must be running

Create a cluster config (multi-node)

A small YAML file declares how many nodes you want and their roles (one control-plane, two workers here).

kind-config.yaml:

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

Spin it up

One command reads the config and boots the cluster; kind then wires up your kubectl context automatically.

kind create cluster --name cka --config kind-config.yaml

# kind auto-configures kubectl context to this cluster
kubectl cluster-info --context kind-cka
kubectl get nodes

Expected:

NAME                 STATUS   ROLES           AGE   VERSION
cka-control-plane    Ready    control-plane   1m    v1.xx
cka-worker           Ready    <none>          1m    v1.xx
cka-worker2          Ready    <none>          1m    v1.xx

kubectl context (which cluster am I talking to?)

A context binds kubectl to a specific cluster, user, and namespace — switch contexts to point commands at a different cluster.

kubectl config get-contexts
kubectl config current-context
kubectl config use-context kind-cka

Useful kind ops

Everyday housekeeping commands for listing, deleting, and peeking at the node containers.

kind get clusters            # list clusters
kind delete cluster --name cka
docker ps                    # see the node containers

Pin a Kubernetes version (handy for CKA practice)

Pass a specific node image to lock the cluster to the Kubernetes version you want to practise against.

kind create cluster --name cka \
  --image kindest/node:v1.30.0 --config kind-config.yaml

End-to-end flow

One config file to a ready multi-node cluster: kind boots node containers, bootstraps Kubernetes, and wires up your context.

Key takeaways

  • Kind nodes are Docker containers, not VMs — fast and disposable.
  • One config file defines control-plane + worker roles.
  • kubectl talks to the cluster via the context in your kubeconfig.

Checklist

  • [ ] Installed kind + kubectl, Docker running
  • [ ] Created a 3-node cluster from config
  • [ ] kubectl get nodes shows control-plane + 2 workers Ready
  • [ ] Switched contexts and deleted a cluster