Minikube installation in Ubuntu

Minikube is a tool to run Kubernetes locally as a single-node cluster, which is very useful for learning and developing. A regular Kubernetes installation needs at least three hosts. The first one will be the Kubernetes Master, the cluster manager. The rest will be Kubernetes Nodes, which are responsible for running the workloads.

Installing kubectl

There is a tool called kubectl for managing Kubernetes clusters. We will install it before, and Minikube installation process will configure it correctly.

$ curl -LO$(curl -s
$ chmod +x ./kubectl
$ sudo install kubectl /usr/local/bin/

Check the kubectl status:

$ kubectl version --client

Installing Minikube

Minikube can be installed in a virtual machine or on your host. To keep my host clean, I prefer to use a virtual machine, so I will use Virtualbox because it has a broader user base than KVM. Let’s install it.

$ sudo apt install -y virtualbox

Once having Kubernetes installed, download Minikube and install it.

$ curl -Lo minikube
$ chmod +x minikube
$ sudo install minikube /usr/local/bin/

If not installed yet, an installation process will happen. The --driver parameter specifies where Minikube will run. You have to change it if you’re going to use a different approach like KVM or Docker. There is a list with all the available drivers.

$ minikube start --driver=virtualbox

Use the argument status to check Minikube.

$ minikube status
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

You can now start working with Minikube. When you finish your work, you can stop Minikube using stop argument.

$ minikube stop

From now, you can start Minikube at any time without specifying the driver.

$ minikube start

If you had installed Minikube before, you could get machine does not exist error when you try to run it. It happens because the local state of Minikube is dirty, so you must clean it.

$ sudo minikube delete

Cheking overall installation

Let’s check now the configuration of kubectl to ensure it’s working with the Minikube environment we installed.

$ kubectl cluster-info
Kubernetes master is running at
KubeDNS is running at

Ok, it’s working with the server in IP address. Let’s check now if our Minikube server is working with that IP address:

$ minikube ip

As a final check, get all the resources of the Minikube master using kubectl:

$ kubectl get all
NAME                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
service/kubernetes   ClusterIP    <none>        443/TCP   118m

That’s correct. Both Minikube and kubectl are working correctly.

Full sail!

You already have everything you need to navigate the magnificent ocean of Kubernetes. Prepare your course, hold the rudder tight, and don’t go off, buccaneer. See you at the next port. Good winds!