Guides
Linux, Mac, Windows वर kubectl आणि kind (किंवा minikube) Install
By Ravindra Bagale, DevOps trainer · LinkedIn · Published: · Last updated:
kubectl install, Docker, kind/minikube start, current-context, get nodes.
Friends, install the client first, then a tiny local cluster. Chala mitrano — always check current-context before apply.
मित्रांनो, आधी client, मग छोटा local cluster. Chala mitrano — apply आधी current-context तपासा.
मित्रों, पहले client, फिर छोटा local cluster। Chala mitrano — apply से पहले current-context जाँचें।
Quick answer
Hold this vertical picture:
- kubectl.
- Docker.
- kind/minikube.
- context.
- get nodes.
Language: English · मराठी · हिंदी
Local K8s lab
Local cluster का
Cloud bill/prod risk नको.
Why: Prod वर पहिला apply = outage.
What: kind/minikube.
How: client आधी.
Example 1: Check if kubectl exists
Type this:
command -v kubectl >/dev/null && kubectl version --client 2>/dev/null | head -1 || printf '%s\n' 'kubectl not installed yet'
You will see:
What it means: Client-only version works even without a cluster.
Example 2: Download pattern (no real URL host ban)
Type this:
printf '%s\n' 'Install kubectl from your OS package manager or the official Kubernetes release page for your arch'
You will see:
Install kubectl from your OS package manager or the official Kubernetes release page for your arch
What it means: Prefer distro packages when your company mirrors them.
Example 11: Windows note
Type this:
printf '%s\n' 'On Windows use WSL2 + Docker Desktop, then install kubectl and kind inside WSL'
You will see:
On Windows use WSL2 + Docker Desktop, then install kubectl and kind inside WSL
What it means: Git Bash alone is not enough for kind.
Concept 1: kind vs minikube
Team standard.
Why: Tool fight.
What: create/start.
How: Docker healthy.
Example 3: kind version check
Type this:
command -v kind >/dev/null && kind version || printf '%s\n' 'kind not installed yet'
You will see:
What it means: kind runs a cluster inside Docker — great Infosys lab choice.
Example 4: kind create cluster command
Type this:
printf '%s\n' 'kind create cluster --name lab'
You will see:
kind create cluster --name lab
What it means: Creates kubeconfig context kind-lab.
Example 5: minikube start alternative
Type this:
printf '%s\n' 'minikube start --driver=docker'
You will see:
minikube start --driver=docker
What it means: Use minikube if your team standard says so.
Example 10: Docker must be running
Type this:
docker info >/dev/null 2>&1 && echo docker_ok || echo docker_needed
You will see:
What it means: kind and minikube docker driver need a working Docker engine.
Concept 2: Context
current context.
Why: Wrong = prod.
What: get-contexts.
How: lab names.
Example 6: kubectl get nodes
Type this:
printf '%s\n' 'kubectl get nodes'
You will see:
What it means: Ready under STATUS means the lab API works.
Example 7: Current context
Type this:
printf '%s\n' 'kubectl config current-context'
You will see:
kubectl config current-context
What it means: Wrong context is the classic prod accident — always check.
Example 8: List contexts
Type this:
printf '%s\n' 'kubectl config get-contexts'
You will see:
kubectl config get-contexts
What it means: Star marks the active context.
Concept 3: Prove/clean
Ready; delete.
Why: Disk भरते.
What: get nodes; delete.
How: WSL2/brew.
Example 9: Delete kind cluster
Type this:
printf '%s\n' 'kind delete cluster --name lab'
You will see:
kind delete cluster --name lab
What it means: Clean labs keep disk free on shared laptops.
Example 12: Mac note
Type this:
printf '%s\n' 'On Mac: brew install kubectl kind # or minikube'
You will see:
On Mac: brew install kubectl kind # or minikube
What it means: Apple Silicon needs arm64 binaries.
Example 1: Check if kubectl exists
Type this:
command -v kubectl >/dev/null && kubectl version --client 2>/dev/null | head -1 || printf '%s\n' 'kubectl not installed yet'
You will see:
What it means: Client-only version works even without a cluster.
Install card
1 kubectl 2 Docker 3 kind/minikube 4 context 5 get nodes
Suppose: kind fails
Start Docker.
Suppose: wrong cluster
Switch context.
Ravindra Bagale's Tip
At Cognizant labs, kind on Docker is the default interview prep cluster. Reviewers ask how you switch contexts safely.
Cognizant labs मध्ये Docker वर kind interview prep default. Reviewers context switch सुरक्षित कसे विचारतात.
Cognizant labs में Docker पर kind interview prep default है। Reviewers सुरक्षित context switch पूछते हैं।
Check yourself (quiz)
Q1. Client?
kubectl
Q2. kind?
Docker
Q3. Prove?
get nodes
Q4. Safety?
context
Q5. Windows?
WSL2
Q6. Cleanup?
kind delete
Reading tracking
Mark this guide when you finish. Your browser remembers it on this device.
install → start → context → get nodes.
Did you understand? Let us try it once more.
Frequently asked questions
kind or minikube?
Follow your team; both are valid labs.
Why Docker?
These drivers run nodes as containers.
No nodes Ready?
Wait or check docker ps / kind logs.
Multiple contexts?
get-contexts; switch explicitly.
Windows?
WSL2 + Docker Desktop.
Mac ARM?
Install arm64 builds.