Rancher Manager v2.11 to v2.12 Upgrade

3 min read
Table of contents

In this article I will show you how to upgrade the Rancher Manager from v2.11 to v2.12 using Helm. Helm makes managing Kubernetes applications like Rancher Manager incredibly simple - instead of dealing with dozens of YAML manifests, you work with a single chart that handles all the complexity. Upgrading becomes as easy as updating to a new chart version. Keeping Rancher Manager 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 |
Rancher Manager Upgrade
- Create sample apps
# exec on master node
kubectl create deployment nginx-test --image=nginx --replicas=1
kubectl expose deployment nginx-test --port=80 --target-port=80
kubectl create ingress nginx-test --class=nginx --rule="nginx-test.at.lab/*=nginx-test:80"
nano /etc/hosts
---
172.20.20.67 nginx-test.at.lab
- Create script for monitoring apps
# exec on master node
nano monitoring.sh
---
#!/bin/bash
# List of URLs to check
URLS=(
"http://nginx-test.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 -n cattle-system --watch
- Add rancher latest repo
# exec on master node
helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
helm repo update
helm repo list
helm search repo rancher-latest/rancher --versions
- Get existing rancher configuration
# exec on master node
helm get values rancher -n cattle-system -o yaml > values.yaml
- Change mapping rancher to master node and set kubeconfig to rke2
# exec on master node
nano /etc/hosts
---
172.20.20.65 rancher.at.lab
172.20.20.67 #rancher.at.lab
export KUBECONFIG=/etc/rancher/rke2/rke2.yaml
- Upgrade rancher
# exec on master node
helm upgrade rancher rancher-latest/rancher \
--namespace cattle-system \
--values values.yaml \
--version=2.12.0
upgrade process
upgrade completed
- Verification
- Change mapping rancher to ingress node again and set kubeconfig to kubectx
# exec on master node
nano /etc/hosts
---
172.20.20.65 #rancher.at.lab
172.20.20.67 rancher.at.lab
source ~/.bashrc
kubectx
- Operational test
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
