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,360 points
704 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,040 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
• 35,800 points
135 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
488 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,040 points
170 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.