Say you’ve restored an RKE2 Cluster main node from backups and its now on a new hostname and IP address.
The RKE2 server won’t start because the etcd environment will have the old hostname and IP address configured to it.
The solution is to stop your RKE2 server (eg: systemctl stop rke2-server) and update your /etc/rancher/rke2/config.yaml file with the new hostname and IP Address.
Then run the command as root: rke2 server --cluster-reset
Wait for it to complete then start your RKE2 server with systemctl start rke2-server
And wait for the start to complete, then if you find you have various pods stuck in a “Terminating” state, check if the former hostname has a Node entry still which is now in a “NotReady” state still in the former hostname with kubectl get nodes and delete that previous hostname based node with “kubectl delete node $FORMER_HOSTNAME” & the Terminating state pods should then be able to die off and get removed, and you should have a working RKE2 cluster again.