Add Worker Nodes to K3s Cluster
Add Workers
Section titled “Add Workers”Use this tutorial after the control plane is operational to scale out your cluster with additional worker nodes.
Step 1: Add the node to inventory
Section titled “Step 1: Add the node to inventory”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.
Step 2: Run the agent provisioning role
Section titled “Step 2: Run the agent provisioning role”Execute Ansible against the target worker:
ansible-playbook -i ansible/inventory/hosts.yaml ansible/site.yaml --limit worker-01The playbook installs prerequisites, joins the K3s cluster using the cluster join token, and starts the k3s-agent service.
Step 3: Verify the new node
Section titled “Step 3: Verify the new node”Confirm that the new worker reports Ready and displays its role:
kubectl get nodes -o wideCheck that the Flannel CNI and workload pods are scheduling onto the worker:
kubectl get pods -A -o wide