kubectl - error: You must be logged in to the server

8/7/2017

I have configured OIDC with k8s installed using kubeadm. After the configuration, when I run the command kubectl --user=name@gmail.com get nodes I get

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

Can someone please help me with this?

-- NSP
kubeadm
kubectl
kubernetes

2 Answers

8/7/2017

Your password is probably missing.

-- Totoc1001
Source: StackOverflow

8/10/2017

I use kubectl --username=name@gmail.com get nodes and it works. Earlier I was using the parameter --user instead of --username.

-- NSP
Source: StackOverflow