SynfraCore
Synfracore
Start Learning
Navigation

Academies

Platform

RoadmapsLabsCertificationsInterviewPYQsAI AssistantCareer
Start Learning Free🗺️ Learning Roadmaps

KubernetesOverview

What it is, why it matters, architecture and key concepts

✍️
Written by senior engineers. Reviewed for technical accuracy.· Updated 2025 · SynfraCore Kubernetes Team
Expert Content

Kubernetes — Container Orchestration at Scale

Kubernetes (K8s) automatically deploys, scales, and manages containerized applications. When you have 10 containers that need to stay running across 5 servers, handle traffic spikes, restart on failures, and update without downtime — that's what Kubernetes does.

ℹ️ Why Kubernetes?

Without K8s: You manually SSH into servers, run Docker commands, restart crashed containers, and stay up at 3am. With K8s: You declare "I want 3 replicas of my app always running" and Kubernetes makes it happen — forever.

Kubernetes Architecture

CONTROL PLANE API Server Entry point for all requests etcd Cluster state database Scheduler Places pods on nodes Controller Manager Maintains desired state kubectl → API Server WORKER NODES Node 1 kubelet (agent) Pod A Pod B kube-proxy Node 2 kubelet (agent) Pod C Pod D kube-proxy KUBERNETES OBJECTS Pod 1+ containers smallest unit Deployment manages pods rolling updates Service stable IP/DNS load balancing ConfigMap non-secret config env vars / files Secret sensitive config passwords / keys Ingress HTTP routing TLS termination HPA auto-scaling CPU / memory PersistentVolume storage EBS / NFS / EFS Namespace logical isolation multi-team

Core Concepts Explained

Pod — The Smallest Unit

A Pod wraps one or more containers that share network and storage. Containers in the same Pod communicate via localhost. In practice, most Pods have one container.

Deployment — How You Run Apps

You never create Pods directly. You create a Deployment that says "keep 3 replicas of this container running." Kubernetes creates the Pods and continuously ensures that number stays correct — restarting crashed ones, replacing unhealthy ones.

Service — Stable Network Identity

Pods come and go (new IP each time). A Service provides a stable DNS name (my-app.default.svc.cluster.local) and IP that routes to healthy Pods.

Your First Deployment

yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-app
spec:
  replicas: 3                    # Keep 3 copies always running
  selector:
    matchLabels: { app: my-app }
  template:
    metadata:
      labels: { app: my-app }
    spec:
      containers:
      - name: my-app
        image: nginx:alpine
        ports:
        - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: my-app-service
spec:
  selector: { app: my-app }      # Routes to pods with this label
  ports:
  - port: 80
    targetPort: 80
  type: LoadBalancer             # External access
bash
kubectl apply -f deployment.yaml     # Deploy
kubectl get pods                     # Check status
kubectl logs -f my-app-abc123        # View logs
kubectl scale deployment my-app --replicas=5  # Scale up
⚠️ Common Mistake

Never hardcode secrets in your YAML files. Use Kubernetes Secrets or an external secrets manager like AWS Secrets Manager. Your YAML files end up in Git — don't put passwords there.

Share:
Join our Community
Daily tips, job alerts, interview help — join engineers learning together
Up Next
🔤
KubernetesFundamentals
Core concepts from scratch
Also Worth Exploring
← Back to all Kubernetes modules
Prerequisites