Home > Software engineering >  kubectl giving error: Unable to connect to the server: x509: certificate signed by unknown authority
kubectl giving error: Unable to connect to the server: x509: certificate signed by unknown authority

Time:03-09

docker desktop on mac getting error: Unable to connect to the server: x509: certificate signed by unknown authority

The following answers didn't helped much:

kubectl unable to connect to server: x509: certificate signed by unknown authority

My system details :

Operating system: macOS Big Sur Version 11.6

Docker desktop version: v20.10.12

Kubernetes version: v1.22.5

When I do

kubectl get pods

I get the below error: Unable to connect to the server: x509: certificate signed by unknown authority

CodePudding user response:

Posting the answer from comments


As appeared after additional questions and answers, there was a previous installation of rancher cluster which left its traces: certificate and context in ~/.kube/config.

The solution in this case for local development/testing is to delete entirely ~/.kube folder with configs and init the cluster from the scratch.

  • Related