If you are receiving a “certificate signed by unknown authority” error while running kubeadm init
, it means that your Kubernetes API server certificate is not trusted by your local system. This can occur for a number of reasons, such as using self-signed certificates or using a custom CA.
To resolve this issue, you need to add the root CA certificate to the trust store on your machine. Here are the steps to do so:
Obtain the root CA certificate used to sign your Kubernetes API server certificate. You can usually find this in the Kubernetes configuration files.
Copy the root CA certificate to your local machine.
Add the root CA certificate to the system’s trust store. The exact steps for doing this depend on your operating system and distribution.
- On Linux, you can typically copy the certificate to
/usr/local/share/ca-certificates
and runsudo update-ca-certificates
. - On macOS, you can import the certificate into Keychain Access and mark it as trusted.
- On Windows, you can use PowerShell commands like
Import-Certificate
andAdd-TrustedRootCertificate
.
- Once you have added the root CA certificate to your system’s trust store, retry running
kubeadm init
.
This should resolve the “certificate signed by unknown authority” error and allow kubeadm init
to complete successfully.