Skip to content

Instantly share code, notes, and snippets.

@darth-veitcher
Created June 21, 2021 17:22
Show Gist options
  • Save darth-veitcher/0ece81be91896647ec726a99d3335b29 to your computer and use it in GitHub Desktop.
Save darth-veitcher/0ece81be91896647ec726a99d3335b29 to your computer and use it in GitHub Desktop.
Microk8s | Unable to connect to the server: x509: certificate signed by unknown authority

If you get the dreaded error when trying to connect via kubectl from a remote machine to your cluster it means you need to ensure the correct IP addresses are added into the If you get the dreaded [] when trying to connect via kubectl from a remote machine to your cluster it means you need to ensure the correct IP addresses are added into the If you get the dreaded [] when trying to connect via kubectl from a remote machine to your cluster it means you need to ensure the correct IP addresses are added into the /var/snap/microk8s/current/certs/csr.conf.template file and certificates are regerenerated.

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 "10.152.183.1")

See stackoverflow answer.

--

Also ensure we regenerate the certificates with a sudo microk8s.refresh-certs command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment