Rancher Manager v2.11 to v2.12 Upgrade

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
Hostnameat-rke2-1 (master node)
Operating SystemUbuntu 22.04 (Jammy)
vCPU8 (too large for testing)
Memory12 GB (too large for testing)
Disk60 GB
Network172.20.20.65
Hostnameat-rke2-2 (worker node)
Operating SystemUbuntu 22.04 (Jammy)
vCPU4
Memory8 GB
Disk40 GB
Network172.20.20.66
Hostnameat-rke2-3 (ingress node)
Operating SystemUbuntu 22.04 (Jammy)
vCPU2
Memory4 GB
Disk30 GB
Network172.20.20.67

Rancher Manager Upgrade

  1. 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
  1. 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
  1. 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

  1. 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
  1. Get existing rancher configuration
# exec on master node
helm get values rancher -n cattle-system -o yaml > values.yaml
  1. 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
  1. 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

  1. Verification

  1. 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
  1. 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

Muhammad Alfian Tirta Kusuma
Muhammad Alfian Tirta Kusuma