Minikube: Deploying Kubernetes Cluster locally

Minikube is a tool written in Golang to set up the kubernetes cluster locally on the machine.It will require virtualization to be enabled for Operating System. It supports Container Network Interface (CNI Plugins), Domain Name System, Kubernetes Dashboard, Ingress for load balancing, Config Maps and Secrets and Container runtime which can be docker or rkt.

There are many solutions available for setting up Kubernetes cluster for different environment. To get start with the Kubernetes, Minikube is one of the most preferred option.Virtual Machine will be required to run minikube locally on machine.In previous blog, we explained how to setup the Kubernetes Cluster on Azure Container Service. You can visit the blog here. For more information about minikube visit this link.

$kubectlkubectl controls the Kubernetes cluster manager. Find more information at https://github.com/kubernetes/kubernetes.Basic Commands (Beginner): create Create a resource by filename or stdin expose Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service run Run a particular image on the cluster run-container Run a particular image on the cluster set Set specific features on objects…

This will verify the Minikube is installed successfully. Minikube will use default container engine (docker here) to run the app.

Create Kubernetes Cluster through Minikube:

$ minikube start

Verify the Kubernetes Cluster Started:

$ minikube startStarting local Kubernetes v1.7.5 cluster…Starting VM…Getting VM IP address…Moving files into cluster…Setting up certs…Connecting to cluster…Setting up kubeconfig…Starting cluster components…Kubectl is now configured to use the cluster.

The K8S cluster is successfully deployed on local machine.To verify run following command:

$ kubectl config get-clusters

It will list the clusters. You should get the result like:

$ kubectl config get-clustersNAMEminikube

Here Kubectl is successfully configured and Kubernetes cluster will be running on local machine.Minikube is the useful tool in the development environment.