dashboard: Error 500: The server asked for credentials
Hello,
I’m trying to test the dashboard but i get the following errors and i can’t access to the UI
2016/02/14 15:46:15 Getting list of all replication controllers in the cluster
2016/02/14 15:46:15 the server has asked for the client to provide credentials (get replicationControllers)
2016/02/14 15:46:15 Outcoming response to 62.210.220.xx:56978 with 500 status code
Could you please guide me to solve this issue ?
Regards, Smana
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 70 (29 by maintainers)
Commits related to this issue
- Merge pull request #23550 from luxas/fix_hyperkube_certs Automatic merge from submit-queue Fix so setup-files don't recreate/invalidate certificates that already exist Fixes: #23197 and a lot of ot... — committed to kubernetes/kubernetes by k8s-github-robot 8 years ago
- Merge pull request #374 from anvithks/fix373-envsubst [Fixes #373] Fixed envsubst not working on Ubuntu18.04/CentOS8 on VirtualBox — committed to anvithks/k8s-dashboard by skdwriting 4 years ago
For me it was the same issue here’s how i fixed it (like above):
First get the secrets from the right namespace
Delete the default-token from the kube-system namespace
$ kubectl delete secret default-token-7ovhb --namespace=kube-systemDelete the replication controller from the dashboard
$ kubectl delete rc kubernetes-dashboard-v0.1.0 --namespace=kube-systemRecreate the dashboard
$ kubectl create -f dashboard-controller.yamlEnjoy!
One should always check that the default tokens generated by Kubernetes are actually valid, especially after a new cluster installation or Kubernetes update.
One easy way to do so:
Sure! @theobolo Try this: Append
to
kube-apiserver.serviceAppendto
kube-controller-manager.serviceThis will probably fix your issue. (BTW, I haven’t used k8s on azure, but read the source now, and this will probably help)The two issues are different, @theobolo´s is that
serviceAccountsaren’t created for thedefaultnamespace for connecting toapiserver. Thecontroller-managercode above fixes that. Then there’s aServiceAccountControllertoo, and you have to enable that one also. It takes a normal pod, and injects theca.crtandtokenfiles into/var/run/secrets/kubernetes.io/serviceaccount/You can use kubeconfig files with 1.1.0-beta2 version or 1.1 (to be released in 2 weeks). All you need to do is to specify KUBECONFIG env var and point it to the file.
Use --apiserver-port argument for the container in your YAML file. This will fix the problem