In last blog, we discussed about what is kubernetes and what are it’s advantages. In this second post of the series, we are going to discuss how to install the kubernetes locally on your machine.You can find all the posts in the series here.

Installing Kubernetes on Local Machine

One of the cool features of kubernetes that it can be installed and tried out in local. It behaves exactly as it will be on a cluster. To try out kubernetes on local we need to install minikube and kubectl.

The below are the steps

  • Step 1 :Pre-Requisites

To install the kubernetes on local machine, we install minikube. But minikube normally uses some kind of virtualization layer to install the needed software. So for our example, we will use virtualbox as our virtualization layer. For more pre-requisites refer here.

Download and Install virtualbox from here.

  • Step 2 : Install MiniKube

Run the below commands to install minikube on linux. For other operating system, refer here. Latest version as of now is 0.16.0

curl -Lo minikube && chmod +x minikube && sudo mv minikube /usr/local/bin/
  • Step 3 : Install KubeCtl

Kubectl is a command line utility which communicates to kubernetes over it’s REST API. We can install it using below command

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

Interacting With Minikube

Once we installed the minikube and kubectl , we can start playing with kubernetes.

We can start minikube using below command. It downloads minikube iso and start a virtual machine in virtualbox.

minikube start

We can open the kubernetes dashboard using below command

minikube dashboard

We can check is anything running or not, using below command

kubectl get po --all-namespaces

This command should show some kubernetes container running.

Now we have successfully installed and configured the kubernetes on our machine.

In our next post, we will discuss the different abstractions of kubernetes and how to use them in our applications.