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,400 points
3,631 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, 2019 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
• 51,830 points
779 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, 2019 in Others by anonymous
4,950 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 11, 2019 in Kubernetes by Kalgi
• 51,830 points

reshown Apr 12, 2019 by Kalgi 1,378 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,280 points
549 views