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

0 votes

I'm using GKE and am trying to run kubectl commands but I'm getting this error again and again:

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

What am I doing wrong here?

Dec 4, 2018 in Kubernetes by DragonLord999
• 8,380 points
1,493 views

2 answers to this question.

0 votes

I think you're forgetting to run this:

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

Read more about this in the official docs here.

answered Dec 4, 2018 by ajs3033
• 7,280 points
0 votes

You probably missed the --client-ca-file flag in your kubelet Service File.

answered May 3 by Aysha

Related Questions In Kubernetes

0 votes
1 answer

Error saying "The specified bucket does not exist" in kubernetes

Bucket is created in another region. Looks like ...READ MORE

answered Aug 31, 2018 in Kubernetes by Kalgi
• 39,170 points
232 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
1,577 views
+3 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to use gravitational teleport in a container/kubernetes environment?

You can use teleport to augment kubernetes ...READ MORE

answered Jun 28, 2018 in Kubernetes by ajs3033
• 7,280 points
287 views