Update Containers/Kubernetes/Rancher RKE2/Rancher RKE2 Cluster.md

This commit is contained in:
Nicole Rappe
2024-01-22 18:52:58 -07:00
parent 356b1ededf
commit b69f729d16

View File

@ -12,6 +12,7 @@ You will need to run these commands on every server that participates in the clu
``` sh ``` sh
sudo apt update && sudo apt upgrade -y sudo apt update && sudo apt upgrade -y
sudo apt install nfs-common iptables nano htop -y sudo apt install nfs-common iptables nano htop -y
echo "Adding 15 Second Delay to Ensure Previous Commands finish running"
sleep 15 sleep 15
sudo apt autoremove -y sudo apt autoremove -y
sudo reboot sudo reboot
@ -39,6 +40,10 @@ ln -s $(find /var/lib/rancher/rke2/data/ -name kubectl) /usr/local/bin/kubectl
# Temporarily Export the Kubeconfig to manage the cluster from CLI # Temporarily Export the Kubeconfig to manage the cluster from CLI
export KUBECONFIG=/etc/rancher/rke2/rke2.yaml export KUBECONFIG=/etc/rancher/rke2/rke2.yaml
# Add a Delay to Allow Cluster to Finish Initializing / Get Ready
echo "Adding 15 Second Delay to Ensure Cluster is Ready - Run (kubectl get node) if the server is still not ready to know when to proceed."
sleep 60
# Check that the Cluster Node is Running and Ready # Check that the Cluster Node is Running and Ready
kubectl get node kubectl get node
``` ```