33

I have recently installed minikube and VirtualBox on a new Mac using homebrew. I am following instructions from the official minikube tutorial.

This is how I am starting the cluster -

minikube start --vm-driver=hyperkit

On running kubectl cluster-info I get this

Kubernetes master is running at https://192.168.99.100:8443
CoreDNS is running at https://192.168.99.100:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

Then I set the context of minikube

kubectl config use-context minikube

But when I run minikube dashboard it takes a lot of time to get any output and ultimately I get this output -

http://127.0.0.1:50769/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/ is not responding properly: Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503

I am expecting to see a web UI for minikube clusters, but getting error output. Is there something I am doing wrong?

More-info -
OS: macOS Mojave (10.14)
kubectl command was installed using gcloud sdk.

Update
Output of kubectl cluster-info dump

Unable to connect to the server: net/http: TLS handshake timeout

Output of kubectl get pods and kubectl get pods --all-namespaces both

The connection to the server 192.168.99.100:8443 was refused - did you specify the right host or port?
0xC0DED00D
  • 19,522
  • 20
  • 117
  • 184

7 Answers7

47

stop the minikube:

minikube stop

clean up the current minikune config and data ( which is not working or gone bad)

rm -rf  ~/.minikube

Start minikube again: ( a fresh instance )

minikube start
Ijaz Ahmad
  • 11,198
  • 9
  • 53
  • 73
  • 2
    Can you explain why removing some folder should help? – Nico Haase Oct 22 '18 at 08:39
  • It will remove the existing minikube configuration and data so that you can start over from scratch – Ijaz Ahmad Oct 22 '18 at 08:43
  • 3
    While this may answer the question, providing additional context regarding how and/or why it solves the problem would improve the answer's long-term value. – Tiago Martins Peres Oct 22 '18 at 12:47
  • 2
    @tiagoperes this is solving the issue , i have done this many times , answer updated – Ijaz Ahmad Oct 22 '18 at 12:55
  • It happened me when I upgraded to Mojave. rm -rf ~/.minikube worked. It's about inconsistent VirtualBox configuration. – Canbey Bilgili Nov 21 '18 at 09:25
  • Thank you! This is the only thing that solve my problem thank you. I guess configuration files inside the folder deleted got mixed with different type of version and got the whole thing messed up. – ricko zoe Jan 29 '19 at 23:14
  • @rickozoe , welcome , this is the only thing I use to get rid of such issues and dont waste my time – Ijaz Ahmad Jan 29 '19 at 23:43
  • This happened when I tried to start minikube before virtual box. First `minikube start` failed, then I installed virtual box after and tried again things didn't work right (although I could sort of start deployments and stuff). Idempotency problem? This worked for me. – Alexander Kleinhans Feb 23 '19 at 05:40
  • It works for me. I tested before with virtualbox and then with docker ... maybe thats the problem . Deleting .minikube and .kube it works for me. – anibal Jun 19 '19 at 01:32
  • this solution broke my minikube: `certificate apiserver-kubelet-client not signed by CA certificate ca: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "minikubeCA")` don't use it! – Volkan Ulukut Nov 19 '21 at 10:41
13

I believe something is wrong with the VirtualBox networking conflicting with xhyve, I recommend you completely uninstall VirtualBox. Install docker for mac and install the hyperkit driver

Essentially, Hyperkit doesn't use VirtualBox but it uses the xhyve Hypervisor.

It works for me installing docker for mac and the hyperkit driver

$ kubectl cluster-info
Kubernetes master is running at https://192.168.64.2:8443
CoreDNS is running at https://192.168.64.2:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
$ minikube dashboard
Opening http://127.0.0.1:55919/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/ in your default browser...
Rico
  • 58,485
  • 12
  • 111
  • 141
  • Thanks, uninstalling xhyve (docker-machine-xhyve) and reinstalling virtualbox worked for me. – 0xC0DED00D Oct 23 '18 at 19:19
  • @noob If you uninstalled xhyve, doesn't that mean you switched to hyperkit, not that you reinstalled VirtualBox? In any case, I switched to hyperkit and it works for me now. – Matt Browne Oct 02 '19 at 16:22
  • 1
    Tip: it will make the process easier if you run `minikube delete` (assuming you don't care about keeping any of your deployments/etc) prior to switching drivers. I ended up having to reinstall minikube because I didn't do that before uninstalling VirtualBox. – Matt Browne Oct 02 '19 at 16:24
5

I have the same problem and my environment is the same as yours.

  Enabling dashboard ...
  Verifying dashboard health ...
  Launching proxy ...
  Verifying proxy health ...
  http://127.0.0.1:52582/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/ is not responding properly: Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
  • MacOS 10.13.6
  • Docker Desktop for mac
  • VirtualBox
  • Kubernetes v1.15.2

My solution is as follows:

  1. delete the existing VM

minikube delete -p minikube
  1. start minikube

minikube start
  1. Is there a problem with the dashboard?

mushuweideMacBook-Pro:tools mushuwei$ minikube dashboard
  Verifying dashboard health ...
  Launching proxy ...
  Verifying proxy health ...
  Opening http://127.0.0.1:53414/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/ in your default browser...

enter image description here I hope my experience is useful to you!

james mu
  • 51
  • 1
  • 1
2

I think you should delete existing one. Simply run minikube delete -p minikube. After deleting start new minikube cluster

  • Hi Feruz, Welcome to Stack Overflow. Although your suggestion is good, it's been suggested already in some other answer. Furthermore, since this answer is a speculation, it's more suitable for a comment than an answer. Check the help section to find out how to answer question, if you haven't already. Cheers! – 0xC0DED00D Mar 05 '19 at 09:31
  • I've reflagged this as NAA because of the comment above. – halfer Apr 22 '19 at 18:26
  • Flagging this as NAA failed, with the auto-comment "declined - flags should not be used to indicate technical inaccuracies, or an altogether wrong answer". It is possible that the handler (Review Queue or moderator) did not read my comment, but either way I will leave this here, in case anyone else wants to have a go. – halfer Apr 22 '19 at 20:45
1

It's weird but installing a fresh minikube works. Don't know what was the issue that got resolved after fresh installation.

0

If you just want to try the dashboard, you could run a proxy with kubectl proxy and access it in http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

0

I had the same issue. My issue has resolved by changing the driver to latest hyperkit driver.

issue discussed in github

Sony George
  • 558
  • 2
  • 8
  • 16