Minikube without VirtualBox
Because VirtualBox sucks
VirtualBox really sucks. I mean really, really sucks. It’s inefficient, and has a habit of killing my MBP overnight. In my previous article, I wrote a bare bones intro to getting minikube up on macOS.
You can also run minikube against VMware Fusion (which isn’t free but is a lot better than VirtualBox). To do this, you will need to destroy your current cluster and bring up a new one. Copy any data you require off first.
❯ minikube delete
❯ minikube config set vm-driver vmwarefusionYou can also use Docker for Mac/Docker Machine/xhyve to deploy. This needs an extra driver to work.
❯ minikube delete
❯ brew install docker-machine-driver-xhyve xhyve
❯ sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
❯ sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
❯ minikube config set vm-driver xhyveNow, some parts of this are fragile. Switching driver does not work cleanly, and I chose to reboot to clear problems with the xhyve driver. (I bet you can do it without rebooting: this is UNIX after all).
Stopping minikube can also leave your cluster in a state where it can’t start. Logging at a high level (I chose 10, which may be higher than the highest defined level; I haven’t checked will show you when there are problems):
❯ minikube start --v=10 --logtostderr --vm-driver=xhyveHitting Ctrl-C or accidentally starting it more than once can also render minikube unusable. So caveat hackor.
A quick note on reconnecting to running pods:
Once you’ve restarted minikube, you may want to reconnect to an existing pod (such as the PostgreSQL-supplied, client pod). This is a simple task and can be achieved by (in my case):
❯ kubectl attach agile-shrimp-postgresql-client-421007103-g7jxs -iAs blog-entries rot over time, this was run on:
- Kubernetes (client) 1.7.4
- Kubernetes (server) 1.7.0
- Helm (client and server) 2.6.0
- Minikube 0.21.0
- VMware Fusion 8.5.8
- Docker (client and server) 17.07.0-ce-rc3
- xhyve 0.2.0
- docker-machine-driver-xhyve 0.3.3
- macOS Sierra 10.12.6
