Welcome to the Linux Foundation Forum!

Unable to connect to the server: x509: certificate signed by unknown authority

I just started studying for CKA and doesn't have in depth understanding of kubernetes.

I am getting following error message after I reset kubeadm and re-init kubeadm. Any help would be much appreciated :)

zmadmin@ZM-Master-Node:~$ kubectl get nodes
Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")
zmadmin@ZM-Master-Node:~$

Comments

  • serewicz
    serewicz Posts: 1,000

    Hello,

    When you reset the cluster it only deletes the server side configuration files, not your local ~/.kube/config file. When you ran the kubeadm init the second time it should have asked you if you wanted to overwrite the client files. If you did that copy them from the /root directory to your ~/config again and you'll have the proper certificates.

    Regards,

Categories

Upcoming Training