How to install and kick off minikube on Ubuntu?

Install kubectl:

$ sudo apt-get update
$ sudo apt-get install apt-transport-https
$ curl -sSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
$ echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
$ sudo apt-get update
$ sudo apt-get install kubectl

Install virtualbox:

$ sudo apt-get update
$ sudo apt-get install virtualbox

Install minikube (replace v0.30.0 with the latest version available for you):

$ wget https://github.com/kubernetes/minikube/releases/download/v0.30.0/minikube-linux-amd64
$ mv minikube-linux-amd64 minikube
$ chmod +x minikube
$ sudo cp minikube /usr/local/bin/
$ rm minikube

Create the VM and start the cluster (this will create the file ~/.kube/config):

$ minikube start  # use `minikube start --help` for more options
$ kubectl cluster-info

To get the IP address of the cluster:

$ minikube ip
$ sudo vi /etc/hosts  # if you want to assign names to this IP address

To show the Kubernetes dashboard:

$ minikube dashboard

To stop the cluster (shuts down the VM and preserve all states):


$ minikube stop

To restart the VM and cluster:

$ minikube start

To delete the cluster (and the VM):

$ minikube delete
$ rm ~/.kube/config