CertGrid CertGrid
Installation·Certified Kubernetes Administrator

Four-Node kubeadm Cluster Setup

Build a control plane and three workers, then use the third worker to reach the placement features that need it: pod anti-affinity with somewhere to spread to, topology spread constraints, and a drain that leaves two healthy workers behind. Includes a spread constraint that silently refuses to schedule half your replicas, and why.

Installation and Cluster Builds Guide 10 of 103 Intermediate

Written against the versions above. Tokens, hashes, pod suffixes and timings differ on every run. Scheduler messages are quoted exactly as they appeared on this cluster.

Four machines. Three workers is the smallest cluster where placement rules have real choices to make.
Server NameIP AddressOSRolesCPURAMHDD
CKA1001192.168.0.175Ubuntu 26.04 LTSControl Plane Node2 Core4 GB50 GB
CKA1001-NODE01192.168.0.176Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE02192.168.0.177Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE03192.168.0.178Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB

Before you start

  1. Prepare all four machines identically

  2. Install the packages on all four machines

  3. Initialise the control plane and join all three workers

  4. Install Calico

  5. The default spread: even, with no configuration

  6. A topology spread constraint that strands half your replicas

  7. Why it stalled: the control plane is a topology domain

  8. Pod anti-affinity: one per node, and the fourth has nowhere to go

  9. Drain a worker with two others still standing

  10. Clean up

Official sources