Unable to reach the Kubernetes cluster through the KUBECONFIG file from outside the VM or the deployer host when the control plane node1 is completely down.
Workaround
If you do not have DNS or a VIP for Kunernetes API access from outside the cluster, you can gain access to the cluster from one of the other control node plane by retreiving the KUBECONFIG file from a specific location. For example, if 10.225.67.45 is the second control plane node in the cluster, you can perform the following steps to get the KUBECONFIG file.
root [~]# scp <ssh user>@<contro-plane-node2>:/home/tco/.kube/config /tmp/config 100% 5685 5.6KB/s 00:00 100% 5685 5.6KB/s 00:00 root [~]# grep 127.0.0.1 /tmp/config server: https://127.0.0.1:6443 root [~]# sed -i 's/127.0.0.1/<contro-plane-node2>/' /tmp/config root [~]# grep <contro-plane-node2> /tmp/config server: https://<contro-plane-node2>:6443 root [~]# export KUBECONFIG=/tmp/config root [~]# kubectl get nodes NAME STATUS ROLES AGE VERSION node1 Ready control-plane 5d18h v1.26.5 node2 Ready control-plane 5d18h v1.26.5 node3 Ready control-plane 5d18h v1.26.5 node4 Ready <none> 5d18h v1.26.5 node5 Ready <none> 5d18h v1.26.5 node6 Ready <none> 5d18h v1.26.5 node7 Ready <none> 5d18h v1.26.5
Note: If you are a root user, then the path can be
/root/.kube/config /tmp/config, else it is
/home/tco/.kube/config /tmp/config.