This issue can occur if you revert the master node. However, the worker nodes still assume the connection with the old master node.
Workaround:
Run the following command to retrieve a token from the master node:
//get token - kubeadm token create --print-join-command
Remove the following files from the worker nodes:
ca.crt
// sudo rm /etc/kubernetes/pki/ca.crt
kubelet.conf
// sudo rm /etc/kubernetes/kubelet.conf
Delete the worker nodes:
Run commands:
kubectl drain <name-of-the-node> --ignore-daemonsets
kubectl delete node <name-of-the-node>
Repeat the previous step for all the nodes.
Connect the master node with the worker nodes:
// kubeadm join <master-node-IP>:6443 --token n5hxyu.v0wzsc0zk9rosohw --discovery-token-ca-cert-hash sha256:4e891f83f3aaa75832d8a955e25ed50111d6bc3b26146180e2c4d48f9fa5556d