I changed the hostname on one of the nodes and ended up in this when I issue a kubectl get nodes. How can I update this
[root@grs-testkubemaster01 ~]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
abc-testkubemaster01 Ready master 22h v1.10.2
abc-testkubemaster02 Ready <none> 19h v1.10.2
abc-testkubenode01 Ready <none> 56m v1.10.2
abc-testkubenode01.xyz.local NotReady <none> 1h v1.10.2
abc-testkubenode02 Ready <none> 19h v1.10.2
[root@grs-testkubemaster01 ~]#
Perform the following actions on the master:
kubectl delete node abc-testkubenode01.xyz.local
kubeadm token create --print-join-commandOn the worker change your hostname, then reset the kubelet by resetting kubeadm
kubeadm reset Then take the output of the join command from the master and paste it into the worker
As you have list out the nodes
kubectl get nodes Now you can select specific node and edit updatable field in the node resources file. for examples
kubectl edit nodes abc-testkubemaster01