Step 1: Get join command
On the master, run:
sudo kubeadm token create --print-join-command
This prints the full command with token and certificate hash.
Step 2: Run on worker
sudo kubeadm join <master-ip>:<port> --token ... --discovery-token-ca-cert-hash sha256:...
Step 3: Fix common errors
- Missing socat:
sudo apt install socat
- br_netfilter not loaded:
sudo modprobe br_netfilter echo "br_netfilter" | sudo tee /etc/modules-load.d/br_netfilter.conf sudo sysctl -w net.bridge.bridge-nf-call-iptables=1
- ip_forward = 0: edit
/etc/sysctl.conf
to addnet.ipv4.ip_forward=1
, thensudo sysctl -p
. - ebtables missing:
sudo apt-get install ebtables
Step 4: Verify from master
kubectl get nodes
Your new worker should appear in Ready
state.
Conclusion
Joining nodes isn’t just about one command. Kernel settings and small packages matter. Once configured, scaling your cluster is smooth.