Skip to content

Add Worker Nodes to K3s Cluster

Use this tutorial after the control plane is operational to scale out your cluster with additional worker nodes.

Update ansible/inventory/hosts.yaml with the new worker node details under k3s_agents:

k3s_agents:
hosts:
worker-01:
ansible_host: WORKER_TAILSCALE_IP
ansible_user: sudhanva
k3s_node_ip: "WORKER_TAILSCALE_IP"

Replace WORKER_TAILSCALE_IP with the output of tailscale ip -4 on the worker. Every node uses its Tailscale IP as the node IP, so nodes reach each other and the API server over the tailnet regardless of LAN addressing.

Execute Ansible against the target worker:

Terminal window
ansible-playbook -i ansible/inventory/hosts.yaml ansible/site.yaml --limit worker-01

The playbook installs prerequisites, joins the K3s cluster using the cluster join token, and starts the k3s-agent service.

Confirm that the new worker reports Ready and displays its role:

Terminal window
kubectl get nodes -o wide

Check that the Flannel CNI and workload pods are scheduling onto the worker:

Terminal window
kubectl get pods -A -o wide