Skip to content
Open Source

Add nodes

Run zeatend node add on a server, run the commands it prints on the new server, and revoke the join token when the node is Ready.

zeatend node add runs on a server of the cluster and prints what a new server needs to join: a configuration file with a join token, and the commands to run there. The new server's own zeatend plan checks the ports and the round-trip time to the cluster before it joins.

DistributionWhat you can add
K3sWorkers. K3s set up by Zeatend has one server.
RKE2Workers, and more servers with --role server.
KubeSoloNothing. KubeSolo runs one node.

Paste this prompt into Claude Code or Codex on a computer that reaches both servers over SSH, and tell it their addresses:

Add my new server to my Zeatend cluster by following https://oss.zeabur.com/docs/zeatend/operations/add-nodes.md.
  • A new Linux server that meets Supported servers, with root through sudo.

  • The same provider and region. Keep every node with the same hosting provider and in the same region. Different availability zones in one region are fine. Between providers or regions, latency slows etcd, the Kubernetes API and storage.

  • Open ports between the nodes. Allow these in the firewall or security group:

    DirectionK3sRKE2
    To the serversTCP 6443TCP 9345 and 6443
    Between all nodesTCP 10250, UDP 8472 (flannel VXLAN)TCP 10250 and 9099, UDP 8472 (Canal VXLAN)
    Between serversNoneTCP 2379 to 2381

    Keep UDP 8472 closed to the internet. If it is blocked between nodes, pods on different nodes can't reach each other.

On a server of the cluster, run:

sudo zeatend node add

On RKE2, add --role server to add a server instead of a worker. The new server reaches this one at this node's InternalIP; to use another address, add --address <address>.

It prints the commands for the new server:

On the new VM, as root, with this zeatend copied to /usr/local/bin:
install -d -m 0700 /etc/zeatend
(umask 077; cat > /etc/zeatend/config.yaml) <<'EOF'
distribution: k3s
storage:
longhorn: true
join:
server: https://10.0.1.10:6443
role: worker
token: K10…::abcdef.0123456789abcdef
nodeNames: [vps-1]
EOF
zeatend plan # what it installs, the distance to this server, the ports and warnings
zeatend apply # installs K3s and waits until the node is Ready
The token joins workers for 1h. Revoke it once the node is Ready; the node keeps working without it.
With a second node, the Zeabur catalog recommends Longhorn, which needs every node prepared. Here, add these lines to /etc/zeatend/config.yaml and run zeatend apply:
storage:
longhorn: true
When the node is Ready, here:
/var/lib/rancher/k3s/data/current/bin/kubectl --kubeconfig /etc/rancher/k3s/k3s.yaml get nodes -o wide
/usr/local/bin/k3s token delete abcdef # revokes the token

A worker's token joins workers for one hour. Change that with --ttl, such as --ttl 30m, up to 24h. Each run of node add makes a new token.

The configuration turns on storage.longhorn, because the new node makes the cluster multi-node and the Zeabur catalog then recommends Longhorn. When this server's configuration doesn't turn it on, the output also tells you to turn it on here and run zeatend apply, so this server is prepared too.

An RKE2 server gets the cluster's server token instead, which doesn't expire and joins servers and workers. Its configuration also copies this server's disable list and apiServer settings, because every server runs an API server and deploys the packaged components. Keep the output out of chats and tickets.

Install the same Zeatend on the new server

Section titled “Install the same Zeatend on the new server”

Check the version on the server:

zeatend --version

On the new server, run the download commands of Download Zeatend with the first line replaced by that version, such as version=v0.2.0.

Open a root shell on the new server with sudo -i, and paste the commands that node add printed, from install -d to zeatend apply.

zeatend plan shows the release, the files it writes, the round-trip time to the server and which of the server's ports it can reach:

Distance 0.7 ms to the server (median of 5 TCP connects; 0.6 to 0.9)
Ports on the server
open TCP 6443 Kubernetes API and K3s supervisor
open TCP 10250 kubelet
unknown UDP 8472 flannel VXLAN

A port shown as CLOSED is blocked between the two servers; open it before you go on. Zeatend can't check UDP ports, so unknown is expected for UDP 8472.

zeatend apply installs the distribution, joins the cluster and waits until the node is Ready:

vps-2 joined the cluster as a worker. List the nodes on a server:
sudo /var/lib/rancher/k3s/data/current/bin/kubectl --kubeconfig /etc/rancher/k3s/k3s.yaml get nodes -o wide
==> Waiting for node vps-2 to be Ready
==> Done

On the first server, run the two commands that node add printed last. The first lists the nodes; the new one shows Ready:

sudo /var/lib/rancher/k3s/data/current/bin/kubectl --kubeconfig /etc/rancher/k3s/k3s.yaml get nodes -o wide

The second revokes the worker's token. Replace abcdef with the token ID it printed:

sudo /usr/local/bin/k3s token delete abcdef

On RKE2, the commands use /var/lib/rancher/rke2/bin/kubectl, /etc/rancher/rke2/rke2.yaml and rke2 token delete. The server token of an RKE2 server can't be revoked this way.

Keep /etc/zeatend/config.yaml on the new server: zeatend apply reads it again when you upgrade. A revoked token in it joins nothing.

etcd needs a majority of the servers to run. With three servers, the cluster keeps running when one goes down. With two, losing either one stops the cluster, so add a third.

Zeatend doesn't change objects in the cluster. On a server, move the pods off the node and delete it:

kubectl drain <node> --ignore-daemonsets --delete-emptydir-data
kubectl delete node <node>

Then uninstall Zeatend's cluster from that server. Pods with volumes on the default local-path storage class can't move to another node: the data stays on the node that created it.