Update Servers/Containerization/Kubernetes/Deployment/Rancher RKE2.md
All checks were successful
GitOps Automatic Deployment / GitOps Automatic Deployment (push) Successful in 7s

This commit is contained in:
2025-12-10 20:04:04 -07:00
parent 2190fcff4c
commit 422bc2a9ca

View File

@@ -162,7 +162,7 @@ This is the part where you can add additional controlplane nodes to add addition
``` sh ``` sh
curl -sfL https://get.rke2.io | INSTALL_RKE2_TYPE=server sh - curl -sfL https://get.rke2.io | INSTALL_RKE2_TYPE=server sh -
``` ```
### Configure and Connect to Initial ControlPlane Node ### Configure and Connect to Existing/Initial ControlPlane Node
``` sh ``` sh
# Symlink the Kubectl Management Command # Symlink the Kubectl Management Command
ln -s $(find /var/lib/rancher/rke2/data/ -name kubectl) /usr/local/bin/kubectl ln -s $(find /var/lib/rancher/rke2/data/ -name kubectl) /usr/local/bin/kubectl
@@ -171,15 +171,14 @@ ln -s $(find /var/lib/rancher/rke2/data/ -name kubectl) /usr/local/bin/kubectl
mkdir -p /etc/rancher/rke2/ mkdir -p /etc/rancher/rke2/
# Inject IP of Initial ControlPlane Node into Config File # Inject IP of Initial ControlPlane Node into Config File
echo "server: https://192.168.3.21:9345" > /etc/rancher/rke2/config.yaml echo "server: https://192.168.3.69:9345" > /etc/rancher/rke2/config.yaml
# Inject the Initial ControlPlane Node trust token into the config file # Inject the Initial ControlPlane Node trust token into the config file
# You can get the token by running the following command on the first node in the cluster: `cat /var/lib/rancher/rke2/server/node-token` # You can get the token by running the following command on the first node in the cluster: `cat /var/lib/rancher/rke2/server/node-token`
echo "token: K10aa0632863da4ae4e2ccede0ca6a179f510a0eee0d6d6eb53dca96050048f055e::server:3b130ceebfbb7ed851cd990fe55e6f3a" >> /etc/rancher/rke2/config.yaml echo "token: K10aa0632863da4ae4e2ccede0ca6a179f510a0eee0d6d6eb53dca96050048f055e::server:3b130ceebfbb7ed851cd990fe55e6f3a" >> /etc/rancher/rke2/config.yaml
# Start and Enable the Kubernetes Service # Start and Enable the Kubernetes Service
systemctl enable rke2-server.service systemctl enable --now rke2-server.service
systemctl start rke2-server.service
``` ```
!!! note !!! note
Be sure to change the IP address of the initial controlplane node provided in the example above to match your environment. Be sure to change the IP address of the initial controlplane node provided in the example above to match your environment.