Home > Storage > PowerStore > Virtualization and Cloud > Dell PowerStore and SUSE Rancher > RKE2 Installation
There are multiple methods to install RKE2. In this paper, we focus on using the install.sh script, because it is straightforward and compatible with all Linux platforms. For alternative installation methods, see the RKE2 Installation Methods page.
For high availability, start with a minimum of three nodes and maintain an odd number of nodes in the cluster when expanding it later.
curl -sfL https://get.rke2.io | sh -
This will install the rke2-server systemd service and other utilities on the system.
token: user-provided-token
tls-san:
- fixed-registration-address.domain.com
- ip-address-of-registration-address
- other-servername-or-ip
token: Exclude this line if you would prefer the token to be generated automatically.
tls-san: Specify extra hostnames or IP addresses for the TLS certificate. If you are using a fixed registration address different from the server’s hostname, include it here to avoid certificate errors.
systemctl enable rke2-server.service
systemctl start rke2-server.service
After the RKE2 finishes its installation, it saves the kubeconfig file to /etc/rancher/rke2/rke2.yaml. This file holds details about the Kubernetes cluster, including users, contexts, and namespaces. The kubectl command-line tool uses this file to access and interact with the cluster.
Note: The installation also generates a secret token in /var/lib/rancher/rke2/server/node-token. When you add additional nodes to the cluster, they need to use this token to register with the cluster.
server: https://fixed-registration-address.domain.com:9345
token: secret-token
tls-san:
- fixed-registration-address.domain.com
- ip-address-of-registration-address
- other-servername-or-ip
server: Specifies the fixed registration address or the first node address (hostname or ip address) to contact for registration. The RKE2 server listens on port 9345 for new node registrations.
token: Specifies the secret token. This can be either the one automatically generated on the first node located at /var/lib/rancher/rke2/server/node-token, or the one you initially provided on the first node.
tls-san: This field should match the information as on the first node.
curl -sfL https://get.rke2.io | sh -
systemctl enable rke2-server.service
systemctl start rke2-server.service
After completing the installation of all nodes, you can inspect the cluster resources and confirm the cluster’s status using the kubectl command-line tool.
ssh into any of the server nodes and execute the following commands:
/var/lib/rancher/rke2/bin/kubectl get nodes -o wide
The nodes should display a Ready status.
/var/lib/rancher/rke2/bin/kubectl get all -A