KevsRobots Learning Platform
30% Percent Complete
By Kevin McAleer, 2 Minutes
Page last updated May 24, 2025

With your K3s control plane (master) running, itβs time to expand your cluster by adding worker nodes.
In this lesson, youβll SSH into each worker Pi and join it to the K3s cluster using a one-liner join command.
Worker nodes use:
k3s agent service to register and run workloadsOn your master node, run:
sudo cat /var/lib/rancher/k3s/server/node-token
It will look something like:
K108f02c5486e1bdf7a9a7f25a2e7aa3c2c74fa67cced8b31332f5c1b715c962c::server:5bc9c3f0d9249...
Copy this token to use on all worker nodes.
On each worker Pi:
SSH into the node:
Run the installer with the following environment variables:
curl -sfL https://get.k3s.io | K3S_URL=https://<MASTER-IP>:6443 K3S_TOKEN=<YOUR_TOKEN> sh -
Replace <MASTER-IP> and <YOUR_TOKEN> with:
192.168.1.100)β Example:
curl -sfL https://get.k3s.io | K3S_URL=https://192.168.1.100:6443 K3S_TOKEN=K108f0... sh -
Back on the master node:
kubectl get nodes
You should now see your worker(s) listed:
NAME STATUS ROLES AGE VERSION
pi-master Ready control-plane,master 10m v1.29.2+k3s1
pi-node1 Ready <none> 1m v1.29.2+k3s1
pi-node2 Ready <none> 1m v1.29.2+k3s1
k3s-agent systemd service.| Issue | Fix |
|---|---|
| Node doesnβt show up | Check firewall/ports (6443 must be open) |
Wrong IP in K3S_URL |
Use masterβs static IP, not hostname |
| Token rejected | Double-check the token or regenerate with --token on reinstall |
k3s-agent service fails |
Check logs with journalctl -u k3s-agent -e |
π Your K3s cluster is now multi-node and ready to deploy workloads!
Next up: Troubleshooting Installation
You can use the arrows β β on your keyboard to navigate between lessons.
Comments