At the time of writing this tutorial, Kubernetes is the industry standard for the container-orchestration system. Kubernetes can be used with many container image formats. Here in this tutorial, we assume the containers’ images are created using Docker. there are many options available to create a kubernetes cluster. In this tutorial, we use Minikube which is a tool for running a one-node kubernetes cluster on your local machine for learning and development purposes. 

installing minikube (Linux and macOS)

Download the latest minikube binary:


curl -Lo minikube


curl -Lo minikube

Make minikube binary executable:

chmod +x minikube

Move it to /usr/local/bin/ so that it can be excited from any directory:

sudo mv minikube /usr/local/bin/

By typing minikube start for the first time, minikube downloads the Minikube ISO and attempts to create a VM in your machine:

minikube start

If you have VirtualBox installed on your machine it creates a VM using VirtualBox driver and starts it. Minikube internally uses kubeadm to bootstrap a kubernetes cluster inside newly created VM. You can verify it in the VirtualBox desktop application.

Minikube automatically creates two folders ~/.kube and ~/.minikube in your home directory which holds the configurations for kubectl and Minikube respectively.

kubectl is a command-line tool that is used to run commands against the kubernetes cluster. in our setup kubectl uses the ~/.kube/config file to connect to our cluster.

there are two other ways available to talk to the cluster. RESTful API server and GUI dashboard are the others. In this tutorial, we are going to install and use the kubectl command-line tool.

Installing kubectl (Linux and macOS)

Download the latest kubectl binary using curl command:


curl -LO$(curl -s


curl -LO$(curl -s

Make the binary executable:

chmod +x ./kubectl

Move it to PATH so that it can be easily accessed:

sudo mv ./kubectl /usr/local/bin/kubectl

To verify that kubectl can find and use the config file created by Minicube run:

kubectl cluster-info