Skip to main content
Version: Next

Add Worker Nodes

You can scale the cluster by joining worker nodes to the NuFi master node. The procedure below assumes an airgapped environment.

Prerequisites

ItemRequirement
OSUbuntu 22.04+ (same architecture as the master)
CPU4 cores or more
RAM16 GB or more
Disk100 GB or more
GPU (optional)NVIDIA driver pre-installed

Network Requirements

DirectionPortProtocolPurpose
Worker → Master6443TCPK3s API
Worker → Master8472UDPFlannel VXLAN

Worker Bundle

The files required to join a worker are included in the worker-bundle directory provided by the NuFi vendor.

worker-bundle/
├── join-worker.sh # Join script
├── k3s # k3s binary
├── k3s.tar.zst # Airgap container images
├── nvidia-container-toolkit/ # NVIDIA CTK (optional)
└── docs/
└── worker-join-guide.md

Get the Token

On the master node, retrieve the join token.

Request

sudo cat /var/lib/rancher/k3s/server/node-token

Response

K10abcdef1234567890abcdef1234567890abcdef1234567890::server:abcdef1234567890
warning

The node-token grants permission for a worker node to join. Take care not to expose it externally.

Run the Join

On the worker node, move into the bundle directory and run the script.

cd worker-bundle
sudo ./join-worker.sh <masterIP> <token>
ArgumentDescriptionExample
masterIPIP address of the master node192.168.10.1
tokenThe full node-token value retrieved aboveK10abc...::server:abc...

Example run:

sudo ./join-worker.sh 192.168.10.1 \
K10abcdef1234567890abcdef1234567890abcdef1234567890::server:abcdef1234567890

Execution Stages

The script automatically performs the following stages.

[1/6] Verify required files
[2/6] System configuration (swap off, sysctl, NVIDIA CTK)
[3/6] Install k3s binary
[4/6] Stage airgap images
[5/6] Register k3s-agent service
[6/6] Wait for join completion
tip

If an NVIDIA GPU is detected, the containerd nvidia runtime is configured automatically.

Verify the Join

On the master node, list the nodes.

Request

kubectl get nodes

Response

NAME STATUS ROLES AGE VERSION
master-01 Ready control-plane,master 3d v1.34.3+k3s1
worker-01 Ready <none> 30s v1.34.3+k3s1

When the new worker node appears as Ready, the join is complete.

info

Airgap image import and CNI initialization can take about 30–90 seconds. If the node is not yet Ready, wait about 2 minutes and check again.

Troubleshooting

Check Logs

# Service status
sudo systemctl status k3s-agent

# Live log
sudo journalctl -u k3s-agent -f

# Last 100 lines
sudo journalctl -u k3s-agent -n 100

Common Errors

SymptomCauseResolution
401 or Failed to get node-ca-hashToken typo or whitespace includedCopy the token again and pass it without surrounding whitespace
dial tcp :6443: connect: timeoutFirewall is blocking 6443Allow worker → master TCP 6443
Repeated flannel ... no routeFirewall is blocking UDP 8472Allow worker → master UDP 8472
certificate not yet validWorker node clock is out of syncSync time with sudo date -s "YYYY-MM-DD HH:MM:SS"
Node doesn't show up in kubectl get nodesAirgap image missing or architecture mismatchCheck image import via journalctl -u k3s-agent

Cancel and Retry the Join

To start the join from scratch, run the following on the worker.

sudo systemctl stop k3s-agent
sudo systemctl disable k3s-agent
sudo rm -f /etc/systemd/system/k3s-agent.service
sudo rm -f /etc/systemd/system/k3s-agent.service.env
sudo rm -rf /var/lib/rancher/k3s /etc/rancher/k3s
sudo systemctl daemon-reload

If the node still appears in the list on the master, remove it.

kubectl delete node <worker-node-name>

Then proceed again from Run the Join.