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,318 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,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
14,587 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,360 points

reshown Apr 12, 2019 by Kalgi 6,074 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,226 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