Minikube helps to create the Kubernetes environment on a personal computer. This post aims to show you a few simple steps to install Minikube on Windows Machine. Before installing minikube, make sure you have installed kubectl.
Step 1: Install kubectl
Go to https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-on-windows and following the link under “Install Kubectl on Windows”.
Create a folder called Kube or anything and then copy and paste the minikube .exe file in that folder.
Next, click on “This PC” then properties and then advance and then click on environmental variables.
Next, click on path and then click on edit and add the path as shown below:
Step 2: Install Hypervisor
To run minikube you need a hypervisor. If you already have not installed a hypervisor, you can install one of the following.
remember that if Hyper-V is already running on your machine you won’t be able to install a virtual box. so, if you want to use
VirtualBox, make sure Hyper-V is disabled.
Step 3: Install Minikube
Go to https://kubernetes.io/docs/tasks/tools/install-minikube/#install-minikube and download the .exe file from the link below.
Next, copy and paste the minikube-windows-amd64.exe file to the directory where you stored the kuebctl. Next, rename the
minkube-installer.exe to minikube.exe.
To start Minikube, type “minikube start” in the command prompt.
To enable the dashboard:
Once you type the dashboard command as showb above, you will get a minikube dashboard link to access it. The link
will look simial to the below link.
SSH to minikube
To ssh inside minikube:
Location of minikube config.json file
What to do if the Minikube installation fails?
If the minikube installation fails. Then you need to run:
minikube config set vm-driver virtualbox
Next go to the Windows user home directory such as C:\Users\username and delete the .kube and .minikube directory and then run “minikube start”.
Set memory and cpus config
minikube config set memory 5000
minikube config set cpus 4
minikube config set disk-size 30000MB
If you want to keep the default config and specify the memory during start time only, run :
The VM configs can be overridden by passing flags like:
minikube start --memory 1024
To check the current config stat run:
minikube config view
How to SSH to Minikube
To ssh inside minikube, run the command below.
To get inside the pod from the windows command prompt
kubectl exec -it app_name sh
To see the directory list inside the pod without getting inside it
kubeclt exec app_name ls
To stop minikube type:
How to SSH inside a Pod in minikube
Note the pod name and then type:
kubectl exec -it myjenkins bash
To install Jenkins using helm you can install the jenkins chart.
Note: before running the helm command, make sure you have alredy installed helm on your machine.
c:\kube>helm install -name myjenkins stable/jenkins
To inspect the jenkins config run
helm inspect values stable/jenkins
To uninstall the chart use:
helm uninstlal myjenkins
and then run “helm list” to check if the chart has been removed successfully