RKE2 Cluster v1.32 to v1.33 Upgrade

3 min read
Table of contents

In this article I will show you how to upgrade the RKE2 Cluster from v1.32 to v1.33 using Rancher. Rancher transforms complex Kubernetes operations into simple point-and-click actions. Instead of manually upgrading each cluster node with SSH and command-line tools, Rancher's web interface lets you orchestrate entire cluster upgrades with just a few clicks from your browser. Keeping RKE2 Cluster current ensures you have the latest features, security patches, and bug fixes.
So, let's get started…
Environment
- RKE2 Cluster and Rancher Manager
Hostname | at-rke2-1 (master node) |
Operating System | Ubuntu 22.04 (Jammy) |
vCPU | 8 (too large for testing) |
Memory | 12 GB (too large for testing) |
Disk | 60 GB |
Network | 172.20.20.65 |
Hostname | at-rke2-2 (worker node) |
Operating System | Ubuntu 22.04 (Jammy) |
vCPU | 4 |
Memory | 8 GB |
Disk | 40 GB |
Network | 172.20.20.66 |
Hostname | at-rke2-3 (ingress node) |
Operating System | Ubuntu 22.04 (Jammy) |
vCPU | 2 |
Memory | 4 GB |
Disk | 30 GB |
Network | 172.20.20.67 |
RKE2 Cluster Upgrade
- Make sure domain mapping
# exec on all nodes
cat /etc/hosts
---
172.20.20.65 at-rke2-1 at-rke2-1.at.lab rancher.at.lab
172.20.20.66 at-rke2-2 at-rke2-2.at.lab
172.20.20.67 at-rke2-3 at-rke2-3.at.lab
- Create sample apps
# exec on master node
export KUBECONFIG=/etc/rancher/rke2/rke2.yaml
kubectl create deployment nginx-upgrade --image=nginx --replicas=2
kubectl expose deployment nginx-upgrade --port=80 --target-port=80
kubectl create ingress nginx-upgrade --class=nginx --rule="nginx-upgrade.at.lab/*=nginx-upgrade:80"
nano /etc/hosts
---
172.20.20.67 nginx-upgrade.at.lab
- Create script for monitoring apps
# exec on master node
nano monitoring.sh
---
#!/bin/bash
# List of URLs to check
URLS=(
"http://nginx-upgrade.at.lab"
)
EXPECTED_STATUS=200 # expected HTTP status
INTERVAL=1 # seconds between checks
echo "📡 Starting Ingress monitoring..."
echo "Expected status: $EXPECTED_STATUS"
echo "Check interval: $INTERVAL seconds"
echo "Press Ctrl+C to stop."
while true; do
for url in "${URLS[@]}"; do
STATUS_CODE=$(curl -s -o /dev/null -w "%{http_code}" "$url")
if [ "$STATUS_CODE" -eq "$EXPECTED_STATUS" ]; then
echo "✅ $(date '+%Y-%m-%d %H:%M:%S') - $url is OK (HTTP $STATUS_CODE)"
else
echo "❌ $(date '+%Y-%m-%d %H:%M:%S') - $url returned HTTP $STATUS_CODE"
fi
done
sleep $INTERVAL
done
chmod +x monitoring.sh
- Run monitoring script
# exec on master node
./monitoring.sh >> monitoring.log
# other panel/windows
tail -f monitoring.log
kubectl get po -A --watch
- Upgrade cluster via rancher
upgrade process
upgrade completed
- Verification
- Operational test
# exec on master node
nano /etc/hosts
---
172.20.20.65 #rancher.at.lab
172.20.20.67 rancher.at.lab
source ~/.bashrc
kubectx
kubectx rke2-cluster
# exec on master node
kubectl create deployment nginx-aft-upgrade --image=nginx --replicas=1
kubectl expose deployment nginx-aft-upgrade --port=80 --target-port=80
kubectl create ingress nginx-aft-upgrade --class=nginx --rule="nginx-aft-upgrade.at.lab/*=nginx-aft-upgrade:80"
nano /etc/hosts
---
172.20.20.67 nginx-aft-upgrade.at.lab
Thank You.
0
Subscribe to my newsletter
Read articles from Muhammad Alfian Tirta Kusuma directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
