29 March 2021

Minikube - lightweight Kubernetes cluster

 Launching Kubernetes as a single node cluster locally

Minikube is the tool that allows you to launch K8S locally. Minikubes runs as a single-node-k8s-cluster inside a VM at your local, before you install kubectl do as below



 # Install minikube on Ubuntu
 # setup minikube using the script here -
   https://github.com/punitporwal07/minikube/blob/master/install-minikube-v2.sh 

 # Install minikube on Linux
 # use this script to launch k8s-cluster on local and interact with Minikube install-minikube.sh
$ git clone https://github.com/punitporwal07/minikube.git
 $ cd minikube
 $ chmod +x install-minikube.sh
 
 Now add your localuser as sudo-user, with root do the following -
 $ vi /etc/sudoers
   next to root ALL=(ALL) add as below for your user 

   localuser ALL=(ALL) NOPASSWD:ALL
 
 $ su - localuser
 $ ./install-minikube.sh





basic minikube command

FunctionCommand
verify kubectl to talk to the clusterkubectl config current-context ( should return minikube)
to start/stop cluster with resourcesminikube start/stop 
minikube start --cpus 6 --memory 8192
to delete noteminikube delete
start version-specific Kube nodeminikube start --vm-driver=none --kubernetes-version="v1.20.0"                                     
check node info kubectl get nodes
kubernetes cluster-infokubectl cluster-info
kubectl binary for Windowskubectl.exe
minikube 64-bit installerminikube-installer.exe


No comments:

Post a Comment