Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

kubectl error: "You must be logged in to the server (the server has asked for the client to provide credentials)"

Tags:

kubernetes

I'm running the following command and getting an error:

$ kubectl get nodes
error: You must be logged in to the server (the server has asked for the client to provide credentials)

What's going on?

like image 487
Petko M Avatar asked Mar 30 '17 07:03

Petko M


1 Answers

You have to run:

$ gcloud container clusters get-credentials [cluster-name]

Docs here.

like image 76
Petko M Avatar answered Sep 19 '22 05:09

Petko M