Lab setup: kind and a multi-node VM cluster
Run a disposable kind cluster and a kubeadm cluster on VMs for practice.
By Invicly Tech, , in Kubernetes Administrator (CKA). About 7 minutes to read.
In short
You need two kinds of practice clusters. kind runs Kubernetes nodes as containers, so you can create and destroy multi-node clusters in a minute. A kubeadm cluster on VMs gives real nodes with systemd, kubelet and static Pods, which the exam's install and troubleshooting tasks require.
Explained simply
You cannot learn Kubernetes administration from reading alone. You need clusters you are allowed to break. The good news is that practice clusters are free: kind runs a whole cluster inside Docker containers on your laptop, and a few small virtual machines (VMs) can host a real kubeadm cluster.
Think of kind as a flight simulator and the VMs as a real training plane. The simulator starts in seconds and is perfect for practising routine moves. The training plane is slower to prepare, but it is the only place to practise engine trouble: broken kubelets, upgrades and etcd restores.
The secret to fast practice is fast reset. If rebuilding takes an hour you will avoid risky drills. Keep a config file for kind and a VM snapshot or script for kubeadm, so a broken cluster is a two-minute problem, not an evening lost.
Press Play on a diagram to walk through it one step at a time.
- Nodes are Docker containers
- Cluster in about a minute
- Great for workloads and networking
- Not realistic for node repair
- Real Linux nodes
- Practice install and upgrade
- etcd backup and kubelet fixes
- Slower to build, snapshot VMs
- 1Build
kind config or VM snapshot
- 2Break
Stop kubelet, edit a manifest, delete a CNI
- 3Fix
Use only kubectl, systemctl, crictl, docs
- 4Reset
kind delete or snapshot restore
- Back to step 1
In depth
Multi-node kind clusters
kind (Kubernetes IN Docker) starts each node as a Docker container that runs systemd, containerd and the kubelet inside it. A small YAML config lists the nodes and their roles. kind create cluster --config kind.yaml builds it, and kind delete cluster removes it.
You can pick the Kubernetes version with --image kindest/node:vX.Y.Z, which is useful to match the exam version. kind's default CNI does not enforce NetworkPolicies, so for policy drills set disableDefaultCNI: true in the config and install Calico or Cilium yourself.
- One control-plane and two workers is enough for most drills
- docker exec -it kind-worker bash gets you onto a node
- Set disableDefaultCNI to practise CNI installs and NetworkPolicies
- 1Your machine
- 2Docker
Runs one container per node
- 3Node containers
kind-control-plane, kind-worker, kind-worker2
- 4Inside each node
systemd, containerd, kubelet
- 5Your Pods
VMs for a kubeadm cluster
For real nodes, create two or three Ubuntu VMs with a tool like Multipass, Vagrant or any hypervisor. kubeadm wants at least 2 CPUs and 2 GB of RAM on the control plane, unique hostnames and MAC addresses, and network access between nodes.
Give the VMs fixed IP addresses so certificates and join commands stay valid after reboots. Make sure the Pod network range you will use (for example 192.168.0.0/16 for Calico, or 10.244.0.0/16) does not overlap the VM network, or routing will break in confusing ways.
Resetting quickly
kubeadm reset undoes what init or join did on a node: it stops static Pods, removes /etc/kubernetes files and clears etcd data on a control plane. It does not clean everything. You should also delete /etc/cni/net.d, flush iptables or IPVS rules if needed, and remove ~/.kube/config.
The fastest option of all is a VM snapshot taken after packages are installed but before kubeadm init. Restoring that snapshot gives you clean nodes ready for a fresh install drill in seconds.
- sudo kubeadm reset -f
- sudo rm -rf /etc/cni/net.d $HOME/.kube/config
- Snapshot name idea: pre-init-v1.34
- 1sudo kubeadm reset -f
Stops static Pods, removes /etc/kubernetes
- 2Remove CNI config
rm -rf /etc/cni/net.d
- 3Flush rules if needed
iptables or IPVS
- 4Remove ~/.kube/config
- 5Or restore a snapshot
Taken before kubeadm init: fastest
Learn it in 3 short steps
About 1h each. Track them with a timer in your plan.
- 1Create a multi-node kind cluster~1h
- 2Provision VMs for a kubeadm cluster~1h
- 3Reset and rebuild clusters quickly~1h
Key points
- Use kind for fast drills on Deployments, Services and NetworkPolicies.
- Use kubeadm VMs for install, upgrade, etcd and node troubleshooting.
- Snapshot VMs after a clean install so you can reset quickly.
- kubeadm reset tears down a node so you can practice init again.
Key terms
Tap a card to flip it. 0/4 known
Examples
# kind.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
# kind create cluster --name cka --config kind.yaml
# kind delete cluster --name ckaThree-node kind cluster config.
A three-node kind cluster ready for NetworkPolicy drills
Step 1: write a config with one control plane, two workers and the default CNI disabled. Step 2: create the cluster. Step 3: install Calico so nodes become Ready and policies are enforced. Step 4: confirm all nodes are Ready.
# kind.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
disableDefaultCNI: true
podSubnet: 192.168.0.0/16
nodes:
- role: control-plane
- role: worker
- role: worker
# kind create cluster --config kind.yaml
# then apply the Calico manifest from its docs
# kubectl get nodesPlanning a VM lab without overlaps
Say your VMs get 10.0.0.10, 10.0.0.11 and 10.0.0.12. Step 1: keep the default Service range 10.96.0.0/12; it does not touch 10.0.0.0/24. Step 2: choose a Pod CIDR like 10.244.0.0/16 for Flannel or 192.168.0.0/16 for Calico. Step 3: pass it to kubeadm init with --pod-network-cidr. Step 4: snapshot the VMs before init so you can repeat the install as often as you want.
Quick reference
- kind create cluster --name lab --config kind.yaml
- kind delete cluster --name lab
- kind create cluster --image kindest/node:v1.34.0 pins the Kubernetes version
- docker exec -it lab-worker bash opens a shell on a kind node
- kubeadm needs 2 CPU and 2 GB RAM on the control plane
- kubeadm reset -f, then remove /etc/cni/net.d and ~/.kube/config
- Pod CIDR must not overlap node or Service networks
Common mistakes
- Practicing only on kind and never touching systemd or static Pod manifests.
- Using default kind networking to test NetworkPolicies; install Calico or Cilium.
Quick quiz
Pick an answer to see if you're right and why.
Practice exercises
Try each one yourself first. Use the hint if you get stuck, then compare with the solution.
- Exercise 1easy
Create a kind cluster named lab with one control plane and two workers, then list the nodes.
- Exercise 2medium
In your kind cluster, stop the kubelet on one worker and watch the node become NotReady, then fix it.
- Exercise 3hard
Write a reset script for a kubeadm VM node that leaves it ready for a fresh kubeadm init or join.
Check yourself
Answer in your head, reveal, then be honest with yourself.
Feel confident about this topic?
Frequently asked questions
- Can I prepare for the CKA with only minikube or kind?
- You can cover most workload and networking tasks, but you also need real nodes for kubeadm install, upgrade, etcd and kubelet troubleshooting.
- How much computer do I need for a VM lab?
- About 8 GB of free RAM runs a control plane and two small workers. Cloud VMs for a few hours are a fine alternative.
- Which Kubernetes version should my lab use?
- Use the version the exam currently uses, and one minor version older so you can practise upgrades.