I have a running node in a kubernetes cluster. Is there a way I can change its name?
I have tried to
But the node won't start.
Anyone know how it should be done?
Thanks
No, you cannot change a name of running cluster, because it serves for discovery inside a cluster and this would require near-simultaneous changing it across the cluster. Sadly, you also cannot change a name of the cluster before init .
If you want to change master IP address in kubeadm config, check following references: replacing the IP address in all config files in /etc/kubernetes. backing up /etc/kubernetes/pki. identifying certs in /etc/kubernetes/pki that have the old IP address as an alt name.
You can change the labels on individual pods using the kubectl label command, documented here. Changing the label of a running pod should not cause it to be restarted, and services will automatically detect and handle label changes.
Usualy it's kubelet that is responsible for registering the node under particular name, so you should make changes to your nodes kubelet configuration and then it should pop up as new node.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With