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,450 points
16,830 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.

For further details, refer to the Kubernetes Course.

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

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

answered May 4, 2019 by Aysha

Related Questions In Kubernetes

0 votes
1 answer
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

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

answered Jan 17, 2019 in Others by anonymous
15,570 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,058 views
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,300 points
2,493 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP