This document explains Minikube installation, setup, common errors, fixes, and Kubernetes basics step‑by‑step. It is written for absolute beginners, especially those running Windows 11 + Docker Desktop.
What is Minikube?
Minikube allows you to run a single‑node Kubernetes cluster locally on your system.
It is mainly used for: - Learning Kubernetes - Testing deployments locally - Practicing kubectl commands.
Minikube needs a driver to run Kubernetes, such as: - Docker (recommended on Windows) - Hyper‑V / VirtualBox (optional).
Prerequisites (IMPORTANT)
Before starting, make sure you have:
✅ Windows Requirements
• Windows 10/11 (64‑bit)
• Virtualization enabled in BIOS
✅ Software to Install
- Docker Desktop (Required) o Enable WSL2 backend during installation o After installation, open Docker Desktop and ensure it is Running
- Minikube o Download from: https://minikube.sigs.k8s.io/docs/start/
kubectl (Kubernetes CLI)
o Usually installed automatically with MinikubeVerify Installation
Open PowerShell and run:
minikube version
kubectl version --client
If both commands work → installation is successful.
📝 NOTE: Minikube Installation Path & PATH Environment Variable (Common Beginner Confusion)
Many beginners think that since Minikube is downloaded from the Downloads folder, the minikube start command must also be run from the Downloads directory.
👉 This is a misconception.
On Windows, when you install Minikube using the official installer, the setup process automatically handles everything for you.
• The minikube.exe file is copied into a bin folder, usually:
• C:\Program Files\Kubernetes\Minikube\
• This bin folder path is automatically added to Windows Environment Variables (PATH) during installation.
Because the PATH variable is already configured:
• Windows knows where minikube.exe is located.
• You do NOT need to go to the installation folder.
• You do NOT need to stay in the Downloads folder.
• You can run minikube start from any directory in PowerShell or Command Prompt.
In simple terms:
Minikube works from anywhere because its bin path is saved in the PATH environment variable automatically during installation.
This behavior is normal, expected, and handled automatically, so no manual path configuration is required from the user.
Starting Minikube (Docker Driver)
minikube start
What Happened Internally
• Minikube detected Docker driver
• Pulled Kubernetes base image
• Created a control‑plane container
• Configured networking (CNI)
Common Warning You Faced
Failing to connect to https://registry.k8s.io/
👉 This happens due to: - Network restriction - Proxy - DNS issue
Important: Even with this warning, Minikube can still start if images are cached or later loaded manually.
Verify Cluster Status
minikube status
Expected Output: - host: Running - kubelet: Running - apiserver: Running
Also verify Kubernetes access:
kubectl cluster-info
kubectl get nodes
Fix for Docker Context & Environment Issue (VERY IMPORTANT)
Sometimes Minikube fails due to wrong Docker context.
Run these commands in every new terminal:
Remove-Item Env:DOCKER_HOST
echo $Env:DOCKER_HOST
docker context use desktop-linux
This ensures Minikube uses Docker Desktop correctly.
Manual Image Pull Fix (Registry Access Issue)
If Minikube cannot pull images automatically, do this manually.
Pull Kubernetes Images Using Docker
docker pull registry.k8s.io/kube-apiserver:v1.34.0
docker pull registry.k8s.io/kube-controller-manager:v1.34.0
docker pull registry.k8s.io/kube-scheduler:v1.34.0
docker pull registry.k8s.io/kube-proxy:v1.34.0
docker pull registry.k8s.io/coredns/coredns:v1.12.1
docker pull registry.k8s.io/etcd:3.6.4-0
docker pull registry.k8s.io/pause:3.10.1
docker pull registry.k8s.io/k8s-minikube/storage-provisioner:v5
docker pull docker.io/kicbase/stable:v0.0.48
Load Images into Minikube
minikube image load registry.k8s.io/kube-apiserver:v1.34.0
minikube image load registry.k8s.io/kube-controller-manager:v1.34.0
minikube image load registry.k8s.io/kube-scheduler:v1.34.0
minikube image load registry.k8s.io/kube-proxy:v1.34.0
minikube image load registry.k8s.io/coredns/coredns:v1.12.1
minikube image load registry.k8s.io/etcd:3.6.4-0
minikube image load registry.k8s.io/pause:3.10.1
minikube image load registry.k8s.io/k8s-minikube/storage-provisioner:v5
minikube image load docker.io/kicbase/stable:v0.0.48
Restart Minikube Cleanly
minikube delete
minikube start --driver=docker --force
Creating Your First Pod (YAML Way)
Apply Nginx Pod
kubectl apply -f nginx-pod.yaml
Check Pod Status
kubectl get pods
Expected flow: - ContainerCreating → Running
Access Pod Using Port Forwarding
kubectl port-forward pod/nginx-pod 8080:80
Now open browser:
http://localhost:8080
Pod Lifecycle Commands
Describe Pod (Debugging)
kubectl describe pod nginx-pod
Delete Pod
kubectl delete pod nginx-pod
Deployment (Recommended Way)
Create Deployment
kubectl create deployment web --image=nginx
Check Status
kubectl get deployments
kubectl get pods
Scaling Application
Scale Up
kubectl scale deployment web --replicas=3
kubectl get pods
Scale Down
kubectl scale deployment web --replicas=1
Self‑Healing Demo
Delete any pod manually:
kubectl delete pod <pod-name>
Expose Application (Service)
kubectl expose deployment web --type=NodePort --port=80
kubectl get services
Access Application
minikube service web
Cleanup Commands
kubectl delete service web
kubectl delete deployment web
Stop & Delete Cluster
minikube stop
minikube delete
Generic kubectl Command Reference
Delete Resources
kubectl delete pod <pod-name> -n <namespace>
//kubectl delete pod nginx-pod -n default
kubectl delete deployment <deployment-name>
//kubectl delete deployment nginx-deployment
kubectl delete namespace <namespace-name>
//kubectl delete namespace dev
kubectl delete configmap <configmap-name>
//kubectl delete configmap app-config
Create Resources
kubectl create <resource-type> <name>
Examples for creating different resources:
🔹 Create a Namespace
kubectl create namespace dev
🔹 Create a Deployment
kubectl create deployment nginx-deployment --image=nginx
🔹 Create a Pod (quick test)
kubectl run test-pod --image=nginx
🔹 Create a ConfigMap (from literal)
kubectl create configmap app-config \
--from-literal=APP_ENV=production
Get / View Resources
kubectl get <resource-type>
Examples of get/view different resources:
🔹 Get Pods
kubectl get pods
🔹Specific namespace:
kubectl get pods -n dev
🔹 Get Deployments
kubectl get deployments
🔹 Get All Resources
kubectl get all
🔹 Get ConfigMaps
kubectl get configmap
🔹 Detailed Info (VERY useful)
kubectl describe pod nginx-pod
kubectl describe deployment nginx-deployment
Important Beginner Tips
✅ Always check namespace when working with pods
✅ Use kubectl describe when something fails
✅ Prefer Deployment over Pod in real projects
✅ If Minikube fails → delete and restart cleanly
Summary
You have successfully: - Installed Minikube - Fixed Docker & registry issues - Created pods and deployments - Exposed services - Understood scaling & self‑healing.
Check out the next part which has covered more about kubernetes!😊
Top comments (0)