Minikube is very popular and the most known Kubernetes version for local software development. It runs inside a virtual machine like VirtualBox and allows developers to run Kubernetes applications locally. As Docker runs natively just on Linux, you may wonder why do we need virtual machine on Linux? Well, not anymore.
Mac users have no other way of running Docker except in a virtual machine, hidden or visible. However, Linux users should be able to run Docker and Kubernetes over it just on the bare metal. Minikube has possibility to run on Linux without a virtual machine, but as it installs locally in that case, different configuration files get spread over the host system and this is pretty much messy, actually not much different than installing Kubernetes using kubeadm . Fortunatelly, MicroK8s comes as help.
Thanks to snapd , light Linux virtualization layer available on Ubuntu and derivative operating system, you may now install MicroK8s using snap simply by running the following command:
To configure kubectl to use this “cluster”, you can just run:
To start and stop microk8s, just type:
Well, good news for Ubuntu users, but what about Mac? Guess what, there is actually Mac version as well. Still runing in a virtual machine, but at least this virtual machine is lighter than VirtualBox. To install the Multipass on Mac, just download the latest *-Darwin.pkg from here . After that, run the following commands:
You can find more usable multipass commands here .
Besides basic Kubernetes functionality, MicroK8s provides several addons:
You can simply enable some of them using microk8s.enable.
That’s all Kubernatus, happy cube-kuttling.