DevOps Roadmap — Part 9: Kubernetes Basics

Agar Docker containers factory me bante hain, toh Kubernetes unka manager hai. Real DevOps yahin se large-scale hota hai.


Why Kubernetes Exists

Docker sirf container chalata hai. Par production me problems aati hain:

Iska answer hai: Kubernetes (K8s)


What Is Kubernetes?

Kubernetes ek container orchestration system hai jo:

Google ne banaya, industry ne adopt kiya.


Kubernetes Architecture (Simple)

👉 Container directly nahi, pod ke andar chalta hai.


What Is a Pod?

Pod ek wrapper hai jo:

Production me rarely single container pods.


Basic Kubernetes Objects


Deployment Explained

Deployment batata hai:

Deployment Example
apiVersion: apps/v1
kind: Deployment
metadata:
  name: web-app
spec:
  replicas: 3
  selector:
    matchLabels:
      app: web
  template:
    metadata:
      labels:
        app: web
    spec:
      containers:
      - name: web
        image: nginx

Yeh ensure karta hai: 3 pods always running.


What Is a Service?

Pods ka IP dynamic hota hai. Service ek stable endpoint provide karta hai.


kubectl — Kubernetes Command Tool

Common Commands
kubectl get pods
kubectl get nodes
kubectl apply -f app.yaml
kubectl delete pod pod-name

kubectl = Kubernetes ka remote control.


Why Kubernetes Is Hard for Beginners

Isliye pehle Docker + CI/CD samajhna zaruri tha.


Reality Check

DevOps engineers:

Understanding > memorizing.


What Comes Next?

Ab containers production me chal rahe hain. Next step: Cloud platforms (AWS/GCP/Azure)

Next Part → Cloud for DevOps
Disclaimer:
Always practice Kubernetes in local environments like Minikube or Kind before production usage.