Error "certificate signed by unknown authority" after switching GCP project

Viewed 7311

After switching gcloud projects using ...

gcloud init

... and then try to do some kubectl command, like this for instance:

kubectl get rc

... I get this error:

error: couldn't read version from server: Get
https://130.211.59.254/api: x509: certificate signed by unknown authority

Why is this and how can I solve it?

3 Answers

step 1: Remove .kube/config file

step 2: gcloud container clusters get-credentials YOURCLUSTERHERE

Still, if you facing issue, then disconnect with your current orgnization network and try with mobile hotspot or your wifi.

Related