I've just managed to upgrade Rancher to 2.12. Unfo...
# rancher-setup
b
I've just managed to upgrade Rancher to 2.12. Unfortunately, one of the clusters built by Rancher has one cattle-cluster-agent pod for 2.12 running and two others which are stuck with "Containers with unready status: [cluster-register]", one on a control plane, the other on a worker. The imported cluster has both cattle-cluster-agents running on workers. Does that matter? Where are the agents meant to be running, on the control plane or on all nodes? I've gone through the suggested fix of CATTLE_TOKEN=$(kubectl -n cattle-system get secret -o json | jq -r '.items[].metadata | select(.annotations."kubernetes.io/service-account.name" == "cattle") | .name') kubectl -n cattle-system delete secret $CATTLE_TOKEN kubectl rollout restart deployment cattle-cluster-agent -n cattle-system but that didn't help with this cluster. Any ideas to get around this?
Through various restarts of pods, re-deployments of cattle-cluster-agent, it got to there being no cluster agents functional. I tried a suggestion from GV-KnowledgeBase to patch it from the management cluster kubectl patch clusters.management.cattle.io <CLUSTERID> -p '{"status":{"agentImage":"dummy"}}' --type merge but that didn't help either. Then I re-started rke2-server on one of the control planes and it all came back to life! If only I'd thought of something as original as "Have you turned it off and on again?" earlier!