Kubelet could not register to master after the hostname changed

8/24/2018

The following error was encountered within kubelet service when I changed the hostname of one of the nodes:

Aug 24 14:28:32 k8s-worker03 kubelet[9255]: E0824 14:28:32.715201    9255 kubelet_node_status.go:103] Unable to register node "k8s-worker03" with API server: nodes "k8s-worker03" is forbidden: node "localhost.localdomain" cannot modify node "k8s-worker03

It was firstly localhost.localdomain and joined the cluster successfully. After the hostname was changed, it was not ready within the output of kubectl get nodes

I tried to delete the node from cluster, and restart the kubelet service on that particular node, but this error appears again with the node not being able to register to the cluster.

Thanks.

-- Jepsenwan
kubelet
kubernetes

0 Answers