EduArn – Online & Offline Training with Free LMS for Python, AI, Cloud & More

Sunday, June 14, 2026

Kubernetes Explained from Scratch | Architecture, Pods, Deployments, Services & Real-World Examples

 `

Kubernetes architecture diagram showing API server, etcd, scheduler, controller manager, kubelet, and kube proxy with pods, deployments, and services in a cloud-native system. By EduArn.com

What is Kubernetes?

Kubernetes (K8s) is an open-source container orchestration platform used to automate deployment, scaling, and management of containerized applications.

 In simple terms:

If Docker runs containers,

Kubernetes manages containers at scale.


Why Kubernetes?

Without Kubernetes:

  • Manual container management
  • No auto-scaling
  • Hard failover handling
  • Difficult multi-node deployment

With Kubernetes:

  • Automatic scaling
  • Self-healing applications
  • Load balancing
  • Zero-downtime deployments
  • Cloud-native architecture support

Who Uses Kubernetes?

Kubernetes is used by:

  • Large Enterprises (Netflix, Google, Amazon)
  • Cloud companies
  • DevOps Engineers
  • Backend teams
  • Startups scaling applications
  • AI/ML infrastructure teams

Benefits of Kubernetes

  •  Auto scaling applications
  •  Self-healing containers
  •  Faster deployments
  •  High availability
  •  Portable across cloud providers
  •  Efficient resource usage
  •  Rolling updates without downtime

Kubernetes Architecture (6 Core Pillars)

1. API Server

👉 Entry point of Kubernetes

  • All requests go through API Server
  • Acts like brain communication hub

2. etcd

👉 Distributed key-value store

  • Stores cluster state
  • Acts as Kubernetes database

3. Controller Manager

👉 Ensures desired state is maintained

  • Watches cluster
  • Fixes failures automatically

4. Scheduler

👉 Assigns Pods to nodes

  • Decides where containers run
  • Based on CPU, memory, load

5. Kubelet

👉 Runs on each worker node

  • Ensures containers are running
  • Communicates with API Server

6. Kube Proxy

👉 Networking layer

  • Handles service networking
  • Load balancing between pods

Kubernetes Core Objects


1. Pod (Smallest Unit)

pod.yaml

apiVersion: v1
kind: Pod
metadata:
name: nginx-pod
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80

Create Pod

kubectl apply -f pod.yaml

2. ReplicaSet

Ensures multiple replicas of pods are always running.

replicaset.yaml

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

Create ReplicaSet

kubectl apply -f replicaset.yaml

3. Deployment (Recommended)

👉 Manages ReplicaSets + Rolling Updates + Rollbacks

deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80

Create Deployment

kubectl apply -f deployment.yaml

Kubernetes Services

Services expose applications inside or outside cluster.


1. ClusterIP (Default)

👉 Internal communication only

apiVersion: v1
kind: Service
metadata:
name: nginx-clusterip
spec:
selector:
app: nginx
ports:
- port: 80
targetPort: 80
type: ClusterIP

2. NodePort

👉 Exposes service on node IP

apiVersion: v1
kind: Service
metadata:
name: nginx-nodeport
spec:
selector:
app: nginx
ports:
- port: 80
targetPort: 80
nodePort: 30007
type: NodePort

Access:

http://<NodeIP>:30007

LoadBalancer

👉 Exposes application externally via cloud load balancer

apiVersion: v1
kind: Service
metadata:
name: nginx-lb
spec:
selector:
app: nginx
ports:
- port: 80
targetPort: 80
type: LoadBalancer

Kubernetes Commands

kubectl get pods
kubectl get nodes
kubectl get services
kubectl describe pod nginx-pod
kubectl delete pod nginx-pod

Real-World Use Cases

  • Microservices architecture
  • Cloud-native applications
  • CI/CD pipelines
  • Auto-scaling web apps
  • AI/ML workloads
  • Banking & fintech systems
  • SaaS platforms

Kubernetes vs Docker

DockerKubernetes
Runs containersOrchestrates containers
Single hostMulti-node cluster
Manual scalingAuto scaling
Basic deploymentProduction-grade systems

🎓 Career Path

Docker → Kubernetes → CI/CD → Cloud (AWS/Azure/GCP) → DevOps Engineer


How Eduarn.com Helps Learners

At Eduarn.com, we help learners move from confusion → clarity → career.

We provide:

For Freshers

  • Structured Kubernetes learning paths
  • Hands-on labs & YAML practice
  • Interview preparation modules
  • Real-world DevOps projects

For Professionals

  • Advanced Kubernetes + Cloud architecture
  • Production deployment strategies
  • CI/CD + GitOps training
  • Certification guidance

For Companies (Corporate Training)

  • DevOps transformation programs
  • Kubernetes migration training
  • Cloud-native adoption workshops
  • Team upskilling programs

👉 Learn more: Eduarn.com


Top 10 Kubernetes FAQs

1. What is Kubernetes?

A container orchestration system.

2. Why use Kubernetes?

To manage containers at scale automatically.

3. What is a Pod?

Smallest deployable unit in Kubernetes.

4. What is Deployment?

Manages pods with rolling updates.

5. What is ReplicaSet?

Ensures desired number of pods are running.

6. What is etcd?

Cluster state database.

7. What is kubelet?

Node-level agent managing containers.

8. What is kube-proxy?

Handles networking and load balancing.

9. What is NodePort?

Exposes service on node IP.

10. Kubernetes vs Docker?

Docker runs containers, Kubernetes manages them.


Final Thought

Kubernetes is not just a tool.

It is the foundation of modern cloud-native systems.

If Docker is the engine, Kubernetes is the automated control system of the entire fleet.


Closing Line

Master Kubernetes, Docker, and Cloud with real-world projects at Eduarn.com — for freshers, professionals, and enterprise teams.

No comments:

Post a Comment

Kubernetes Explained from Scratch | Architecture, Pods, Deployments, Services & Real-World Examples

 ` What is Kubernetes? Kubernetes (K8s) is an open-source container orchestration platform used to automate deployment, scaling, and manag...