Minikube on Ubuntu in VMware (nesting VM’s)

I‘m currently doing the LFS258, Kubernetes Fundamentals course, and it’s awesome.
It suffers however like a lot of other trainings from “asking you to install a tonne of stuff on your machine”-syndrome, inevitably leaving your computer a mess afterwards, unless you take care.

Thus I like to sandbox these things, and as kubernetes was developed early on to work with containers on Linux, I happily downloaded an Ubuntu image and started off; my host being Windows for historical reasons.

This worked without problems, until I had to run a Minikube example and my hypervisor, VirtualBox at the time, unexpectedly died on me with an error:

Oh no, I thought. I’d enabled VT on my host, to run the Ubuntu 64-bit image, but I hadn’t explicitly enabled it on the virtual machine. Turns out it wasn’t entirely my fault; VirtualBox doesn’t support this. But VMware does! link 1 link 2

So I got out VMware Workstation 12 Player, installed Ubuntu, ran all the updates, installed VirtualBox (this is a task in itself..), downloaded Minikube, downloaded kubectl, and… shutdown the virtual machine – time to enable the virtualization (you could probably have done this when creating it initially.. feel free to drop a comment!)

Under Virtual Machine Settings -> Hardware -> Processors -> Virtualization engine enable Virtualize Intel VT-x/EPT or AMD-V/RVI. (I have preferred mode set to Automatic, I suppose it chooses the correct one since the other ones are disabled.)

Boot your VM and run minikube start or minikube start --logtostderr (if you’re impatient.. it takes quite a while, and it’s nice to see something happening… I thought erroneously that it was hanging at some image-caching, but I just had to give it a few…) and voila!

When it’s run to completion, you should be able to run kubectl get nodes and see that it has the status NotReady, fret not, it should become ready in a minute or two.

kubectl get nodes in ubuntu with minikube, kubernetes
(.. or 27 seconds.)

Alas, my host continues to be clean!.. at least for now.

Leave a Reply

Your email address will not be published. Required fields are marked *