I have a lab environment for studying Kubernetes.
It has Calico CNI installed.
Kuberentes version: 1.20.
I would like to rename the single master node in the cluster.
Preferably, without recreating the whole Kubernetes cluster or overriding the master node name.
The idea is to learn to do it right too.
I tought about adding a temporary master node in addition and remove the original master node.
Then reinstall the original master node with same IP and the new name.
Is there a better way to do this?
Asked
Active
Viewed 976 times
0

jwalker
- 98
- 7
-
I'd go for `--hostname-override` option, check [kubelet reference](https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/). Creating one more master node is a part of high availability cluster and it has its own concerns related to `etcd` and how it works + as correctly mentioned in the answer above, certificates is also a concern. Otherwise you need to try and show what you did and what errors you're facing so community can help you to move forward. – moonkotte Jan 31 '22 at 13:37
1 Answers
0
I would do it as you suggested, the concern is the host certificates which are using the hostname, changing the hostname of a master will probably render it's certificates useless as there will be a mismatch between the name specified in the certificate and the hostname itself

Liran Cohen
- 41
- 3