For Beginners: How to Add Worker Nodes to Home K8s

2 min read
Modified
Progress 2 / 18
Table of Contents

In the previous article, I set up just the master node for the time being, but this time is the continuation. I will add a worker node and finally grow it into something “cluster-like”.

Previous Article ↓

おうちKubernetesを構築してみた話【kubeadm + CRI-O + Cilium】

>-

blog.otama-playground.com

Execution Environment

I am building both Master Node and Worker Node with the following specs.

  • OS: ubuntu server 24.04.2
  • CPU: Intel N150 (Cores assigned to VM = 2)
  • RAM: 8GB
  • Disk: 256GB

Procedure

The Master Node is assumed to be already built following the steps in the previous article.

Setup Worker Node

Install kubeadm on the worker node following the same steps as the article below. Up to installation of kubeadm, kubelet, kubectl is fine.

おうちKubernetesを構築してみた話【kubeadm + CRI-O + Cilium】

>-

blog.otama-playground.com

JOIN the Worker Node

Generate a join command on the Master Node side.

Terminal window
# Execute on Master Node side
kubeadm token create --print-join-command

Execute the command outputted by running the above on the Worker Node side.

Terminal window
# Execute on Worker Node side
sudo kubeadm join xyz.xyz.xyz.xyz:6443 --token {token} --discovery-token-ca-cert-hash {hash}

Confirm Node

If the JOIN command finishes successfully, return to Master Node and execute the following command. If the node is added and STATUS becomes READY, it is successful.

Terminal window
kubectl get nodes
# OK if output is like below
# NAME STATUS ROLES AGE VERSION
# test-01 Ready control-plane 123m v1.33.0
# test-02 Ready <none> 2m53s v1.33.0

Assign ROLE while we’re at it

Terminal window
# Assign worker label to worker node
kubectl label nodes test-02 node-role.kubernetes.io/worker=
# Confirm
kubectl get nodes --show-labels
# Success if worker is in roles
# NAME STATUS ROLES AGE VERSION LABELS
# test-02 Ready worker 23h v1.33.0 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=test-02,kubernetes.io/os=linux,node-role.kubernetes.io/worker=

Conclusion

So, the Kubernetes cluster is successfully (?) completed. kubeadm’s JOIN was surprisingly simple, and I was surprised that I could add nodes much smoother than expected.

It’s still far from full-scale operation, but confirming “I can normally make a k8s cluster even in my local Proxmox environment” was a big harvest. Above all, the excitement while building it was irresistible.

Next, I’m thinking of deploying Pods, tweaking Cilium behaviors, or dabbling in storage areas. So, this might continue loosely to next time.