Install kubectl:
$ sudo apt update $ sudo apt 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 update $ sudo apt install kubectl
Install VirtualBox:
$ sudo apt update $ sudo apt 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 -e /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
I work as a freelancer, so if you don’t want to do that kind of things yourself or don’t have the time, just drop me a line to hire me.