Guide to install Minikube on windows to practice Kubernetes and create your first pod.
As a DevOps engineer we are using Kubernetes daily so for practicing it on your local machine we can set up the Minikube which help to practice the Kubernetes concepts. Prerequisites for installing Minikube on Windows. 2 CPUs or more 2GB of free memory 20GB of free disk space Internet connection Container or virtual machine manager, such as: Docker Desktop I will suggest. Search for the Windows PowerShell on Windows right click on it and run it as an administrator Now run the below Commands one by one Step 1: Use the below command to download and run the installer for the latest release. New-Item -Path 'c:\' -Name 'minikube' -ItemType Directory -Force Invoke-WebRequest -OutFile 'c:\minikube\minikube.exe' -Uri 'https://github.com/kubernetes/minikube/releases/latest/download/minikube-windows-amd64.exe' -UseBasicParsing Step 2: Add the minikube.exe binary to your PATH $oldPath = [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine) if ($oldPath.Split(';') -inotcontains 'C:\minikube'){ [Environment]::SetEnvironmentVariable('Path', $('{0};C:\minikube' -f $oldPath), [EnvironmentVariableTarget]::Machine) } Step 3: Start your cluster minikube start Step 4: See the status of the minikube if it is installed or not minikube status If you are able to see the above details after running 4th command then Congratulations you have done the Minikube set up !!! Run your first pod on Kubernetes with the help of minikube. Step 1: Open the GitBash and change the directory to Download. cd /c/Users//Downloads Step 2: Create the pod.yaml file and paste the below data into it. the following is an example of a Pod which consists of a container running the image nginx:1.14.2. apiVersion: v1 kind: Pod metadata: name: nginx spec: containers: - name: nginx image: nginx:1.14.2 ports: - containerPort: 80 Step 3: Run the below command to create the pod with the help of the pod.yaml file kubectl create -f pod.yaml It will shows like below image it means pod has been created. Step 4: Run the below command to see which pods are running in the Kubernetes. kubectl get pods It will show like this Step 5: You can use the below commands according to your requirement. a. Get the all details of the pods kubectl describe pod nginx b. Show Output in Wide Format (More Details like IP, Node) kubectl get pods -o wide c. Get Logs of a Pod (For Debugging) kubectl logs d. Check Pod's YAML Definition (Actual Configuration) kubectl get pod -o yaml e. Open Minikube Dashboard (GUI View):It will open the dashboard in the web browser. minikube dashboard That's all for the day Happy Learning !

As a DevOps engineer we are using Kubernetes daily so for practicing it on your local machine we can set up the Minikube which help to practice the Kubernetes concepts.
Prerequisites for installing Minikube on Windows.
- 2 CPUs or more
- 2GB of free memory
- 20GB of free disk space
- Internet connection
- Container or virtual machine manager, such as: Docker Desktop I will suggest.
Search for the Windows PowerShell on Windows right click on it and run it as an administrator
Now run the below Commands one by one
Step 1: Use the below command to download and run the installer for the latest release.
New-Item -Path 'c:\' -Name 'minikube' -ItemType Directory -Force
Invoke-WebRequest -OutFile 'c:\minikube\minikube.exe' -Uri 'https://github.com/kubernetes/minikube/releases/latest/download/minikube-windows-amd64.exe' -UseBasicParsing
Step 2: Add the minikube.exe binary to your PATH
$oldPath = [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine)
if ($oldPath.Split(';') -inotcontains 'C:\minikube'){
[Environment]::SetEnvironmentVariable('Path', $('{0};C:\minikube' -f $oldPath), [EnvironmentVariableTarget]::Machine)
}
Step 3: Start your cluster
minikube start
Step 4: See the status of the minikube if it is installed or not
minikube status
If you are able to see the above details after running 4th command then Congratulations you have done the Minikube set up !!!
Run your first pod on Kubernetes with the help of minikube.
Step 1: Open the GitBash and change the directory to Download.
cd /c/Users//Downloads
Step 2: Create the pod.yaml file and paste the below data into it.
the following is an example of a Pod which consists of a container running the image nginx:1.14.2.
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
Step 3: Run the below command to create the pod with the help of the pod.yaml file
kubectl create -f pod.yaml
It will shows like below image it means pod has been created.
Step 4: Run the below command to see which pods are running in the Kubernetes.
kubectl get pods
It will show like this
Step 5: You can use the below commands according to your requirement.
a. Get the all details of the pods
kubectl describe pod nginx
b. Show Output in Wide Format (More Details like IP, Node)
kubectl get pods -o wide
c. Get Logs of a Pod (For Debugging)
kubectl logs
d. Check Pod's YAML Definition (Actual Configuration)
kubectl get pod -o yaml
e. Open Minikube Dashboard (GUI View):It will open the dashboard in the web browser.
minikube dashboard
That's all for the day Happy Learning !