Several problems setting up Minikube on macOS

3/16/2019

I have had several issues that are preventing me from using minikube on macOS. I'm new to Kubernetes and just following the Hello Minikube tutorial on the Kubernetes site.

Here are the steps I took, along with errors for each one as applicable:

  1. Before I started this project, I installed Docker for Mac and VirtualBox because I was following the Docker tutorials.
  2. Then I decided to install minikube, so I did it with brew cask install minikube. It installed properly, although I noticed that it couldn't install kubectl because I already had a copy (maybe from Docker for Mac?). I wasn't too happy about that because it was an earlier version, but I proceeded.
  3. Then I ran minikube start and it was OK.
  4. Then I ran minikube dashboard and I got a bunch of errors like "Temporary Error: unexpected response code: 503" so I couldn't launch the dashboard.
  5. That led me to this StackOverflow question (minikube dashboard returns 503 error on macOS). Deleting my minikube configuration didn't work (I got the same errors), so I decided to try the other idea (removing VirtualBox and installing hyperkit instead: brew install docker-machine-driver-hyperkit). (I ran into another issue w/ overlapping binaries when I did that: it was unable to overwrite Docker for Mac's docker-machine with my new one, but I ignored it).
  6. Unfortunately that solution also does not work. I have been trying to start it with minikube start --vm-driver=hyperkit. The first time I tried that, I got a bunch of errors saying "Temporary Error: open /var/db/dhcpd_leases: no such file or directory." Then I ran minikube delete and tried again, and got a bunch of different errors saying "Temporary Error: Could not find an IP address for ee:f3:b0:c8:6f:10"

At this point I'm out of ideas and I don't want to make things even worse. Any idea how to proceed? I don't really care what hypervisor I use, I just want the simplest and most straightforward setup whatever that is (ideally such that I can continue to use both Docker and minikube on my Mac).

This is on macOS Mojave 10.14.3. Minikube version is 0.35.0. kubectl version is 1.10.11. I can't get the Kubernetes version because kubectl can't currently connect to minikube since minikube can't start.

-- Stephen
kubernetes
minikube

1 Answer

3/29/2019

Seems like you had problems with the context and then it got complicated after you tried to use Docker for Mac and then minikube right after another.

What you can do in situations like this in the future is to decide first which cluster/way are you going to use.

To completely delete minikube config files you can run: minikube delete, rm $HOME/.minikube and rm $HOME/.kube also eval $(minikube docker-env -u) will reset env variables.

Then after you have picked minikube or Docker for Mac check if you have right context: kubectl config get-contexts and then pick your kubectl config set-context NAME after that you can start using your cluster of choice.

-- aurelius
Source: StackOverflow