Minikube provides a local Kubernetes environment, typically based on a virtual machine which runs localkube. This is a useful utility to use Kubernetes also as the local development environment.

The benefit this promises is that most of the knowledge from working with the local environment can also be applied when managing the cloud based Kubernetes environment. This way the Kubernetes expertise can be applied in both environments.

Quick setup based on Nix

I prefer to use a proper package manager to manage my locally installed applications, and Nix happens to provide Minikube already in it's package collection Nixpkgs. This makes the installation a snap:

nix-env -iA nixpkgs.minikube

Note

This assumes that nixpkgs points to the package collection.

I've found a small challenge regarding the download of localkube. This is a binary which is copied into the VM and then executed:

$ minikube start
Starting local Kubernetes v1.8.0+54e1cc9df cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
E1119 17:51:04.756766   69761 start.go:222] Error updating cluster:  Error updating localkube from uri: Error attempting to download and cache localkube: Error getting localkube download url: Not a valid localkube version to download

I fount that this seems to be due to the Kubernetes version, the workaround for me was to call it as follows:

$ minikube start --kubernetes-version=v1.8.0

There is an open issue around this topic which might provide further insights in the future: https://github.com/NixOS/nixpkgs/pull/31621.

Challenge on OSX

At the time when I tried this out, there was a small issue due to a missing dependency for OSX: https://github.com/NixOS/nixpkgs/issues/30133.

It got resolved while I was experimenting, so very soon the latest nixpkgs-unstable should contain this fix.


Comments

comments powered by Disqus