User Tools

Site Tools


k8s:distributions:rke2

**This is an old revision of the document!**

RKE2

Docs about RKE2 can be found here.

Install RKE2

There are two install types agent for pure worker nodes and server for management nodes. There need to be at least three server nodes. there can be any number of agent nodes.

It is probably best to install the same version of Kubernetes as the cluster the node will be attached to. If needed the whole cluster can be upgraded after adding the nodes.

curl -sfL https://get.rke2.io | INSTALL_RKE2_TYPE="agent" INSTALL_RKE2_VERSION=v1.xx.yy+rke2zz sudo -E sh -
sudo mkdir -p /etc/rancher/rke2
sudo vi /etc/rancher/rke2/config.yaml

Create a /etc/rancher/rke2/config.yaml which will look something like:

node-name: acdh-cluster3
node-external-ip:
  - 10.3.6.55
node-ip:
  - 10.6.16.55
advertise-address: 10.6.16.55
# the following token can be found on 10.6.16.61 using
# sudo cat /var/lib/rancher/rke2/server/node-token
# comment this setting for the very first master node
token: K10<...>::server:<...>
# on all other servers after the initial setup on 10.6.16.61 is completed
server: https://10.6.16.61:9345
[...]

See Setting Up RKE2 below.

export PATH=$PATH:/opt/rke2/bin
sudo systemctl enable rke2-agent.service
sudo systemctl start rke2-agent.service
sudo journalctl -u rke2-agent -f
k8s/distributions/rke2.1676929588.txt.gz · Last modified: by admin