High Availability

Make Control Plane Highly Available

Official Documentation

Configuration

Installation

The process is the same as for the first control plane node, except for the following changes.

To register additional nodes you need a token from the first control plane node.

cat /var/lib/rancher/rke2/server/node-token

Export the token as an environment variable.

export RKE2_TOKEN={YOUR_TOKEN}

Create the file /etc/rancher/rke2/config.yaml, as described for the first node, and change these settings

server: https://api.infra.tegridy.io:9345
token: {YOUR_TOKEN}
...

Remove public visibility from config file.

chmod go-rwx /etc/rancher/rke2/config.yaml

Install, enable and start RKE2 service as described for the first node.

Check if all nodes are shown Ready

kubectl get nodes
NAME       STATUS   ROLES                       AGE     VERSION
cp-aik4b   Ready    control-plane,etcd,master   5h13m   v1.22.8+rke2r1
cp-doo5i   Ready    control-plane,etcd,master   5h13m   v1.22.8+rke2r1
cp-koeb3   Ready    control-plane,etcd,master   5h13m   v1.22.8+rke2r1