Closed vishwanathjadhav closed 8 months ago
Hi @vishwanathjadhav,
In general, it is quite problematic to change the hostname of the node after deploying MicroK8s. If possible, I would suggest starting from a clean install instead:
# remove everything
sudo snap remove microk8s --purge
# start anew, it should use the new hostname
sudo snap install microk8s --classic [...]
Alternatively, and I strongly advise against doing any of the things below if you must preserve this installation, there are a number of steps you have to follow. The first is to refresh all the server certificates with
sudo microk8s refresh-certs
Then, go into /var/snap/microk8s/current/credentials/known_tokens.csv
and replace instances of your old host name with the new one. Make sure to restart MicroK8s afterwards:
sudo snap restart microk8s
This should get some things back up. There may be more things to look out for, but that should get you a working kubernetes control plane.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Need help on the following issue. I have Installed MicroK8S(1.26.1) on Debian-11.6. I tried to change the hostname of the node after installing the MicroK8S. Followed the following steps to change the hostname.
The syslog is filled with the following error messages:
microk8s status:
Do I need to regenerate the configmaps(error message:
"node-master" is forbidden: User system:node:hostmaster"
) to fix the error? Is there a way to fix the error?