Minikube: Error while starting minikube dashboard

Created on 12 Jul 2016  路  11Comments  路  Source: kubernetes/minikube

Whenever I try to start minikube dashboard, the message "Opening kubernetes dashboard in default browser..." appears on the screen and later nothing happens. Firefox is the default browser in my server. The output of kubectl logs kubernetes-dashboard-3717423461-eovlc --namespace=kube-system looks as follows:

Starting HTTP server on port 9090 Creating API server client for https://10.0.0.1:443 Error while initializing connection to Kubernetes apiserver. This most likely means that the cluster is misconfigured (e.g., it has invalid apiserver certificates or service accounts configuration) or the --apiserver-host param points to a server that does not exist. Reason: the server has asked for the client to provide credentials

Does anyone know how to fix this issue?Thanks.

Most helpful comment

I encountered this same problem. I was eventually able to fix it by deleting the minikube cluster and clearing out the minikube context from the kubectl config.

Here's the commands:

minikube delete
kubectl config delete-context minikube
minikube start

All 11 comments

Hey, this looks like a dupe of #288. Please reopen if it turns out to be different. The current workaround there is to run:

$ kubectl edit secret $(kubectl get secrets --namespace=kube-system -o jsonpath='{.items[0].metadata.name}') --namespace=kube-system

Which will open up your editor. Delete the line that starts with: token:, save the file and exit.

Thanks for your comment; it works now. However, when I type 'minikube dashboard', I get the message 'Opening kubernetes dashboard in default browser...' and nothing happens even though firefox is my default browser. Do you know how to fix this?

What type of system are you on? We use https://github.com/pkg/browser which has different implementations for linux/osx. On osx it looks like it just calls:

$ open $(minikube dashboard --url)

on linux:
$ xdg-open $(minikube dashboard --url)

So after implementing your solution I am able to access the dashboard; but still it doesnt work if I type minikube dashboard on a ubuntu server! Thanks anyway :-)

Yes after installing xdg-utils, it works.

Ah cool, we should add that to the README.

Sorry to bump an old issue but I have no idea what I have done to cause this problem. Essentially I ran minikube start, did a bunch of stuff, ran minikube delete as I wanted to start over and make sure things were clean, ran minikube start and got:

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

Based on the above comment from @dlorenc I ran: kubectl edit secret $(kubectl get secrets --namespace=kube-system -o jsonpath='{.items[0].metadata.name}') --namespace=kube-system and deleted the token.

After that I was able to do things again and everything was wonderful. However after again running minikube delete and minikube start I ran into the same issue. I tried running kubectl edit secret $(kubectl get secrets --namespace=kube-system -o jsonpath='{.items[0].metadata.name}') --namespace=kube-system again but am now getting the you must be logged in when running that:

$ kubectl edit secret $(kubectl get secrets --namespace=kube-system -o jsonpath='{.items[0].metadata.name}') --namespace=kube-system
error: You must be logged in to the server (the server has asked for the client to provide credentials)
error: You must be logged in to the server (the server has asked for the client to provide credentials)
$

Any help would be greatly appreciated.

Seems just giving the cluster more time to start solved this. Sorry! :)

minikube ssh
systemctl status localkube
journalctl -f -u localkube

helps to troubleshoot minikube connectivity issues

I encountered this same problem. I was eventually able to fix it by deleting the minikube cluster and clearing out the minikube context from the kubectl config.

Here's the commands:

minikube delete
kubectl config delete-context minikube
minikube start
Was this page helpful?
0 / 5 - 0 ratings