MongoDB

Kubernetes Architecture Deep Dive

Understand Kubernetes components — control plane, worker nodes, pods, services, and how it orchestrates containerized microservices.

S

srikanthtelkalapally888@gmail.com

Kubernetes Architecture Deep Dive

Kubernetes (K8s) is the standard platform for orchestrating containerized workloads.

Architecture

Control Plane:
  API Server       ← Single entry point
  etcd             ← Cluster state store
  Scheduler        ← Assigns pods to nodes
  Controller Manager ← Reconciliation loops

Worker Nodes:
  kubelet          ← Node agent
  kube-proxy       ← Network rules
  Container Runtime (containerd)
  Pods             ← Your containers

Core Objects

Pod

Smallest deployable unit — one or more containers sharing network/storage.

Deployment

Manages ReplicaSets — ensures N replicas always running.

apiVersion: apps/v1
kind: Deployment
spec:
  replicas: 3
  selector:
    matchLabels:
      app: order-service

Service

Stable DNS + IP for accessing a set of pods.

ClusterIP: Internal only
NodePort: External via node IP
LoadBalancer: Cloud LB provisioned

ConfigMap / Secret

Decouple configuration from container images.

Scheduling

Scheduler places pods based on:

  • Resource requests (CPU, memory)
  • Node selectors / affinity rules
  • Taints and tolerations

Self-Healing

Pod crashes → Kubelet detects → Controller creates replacement
Node fails  → Scheduler reschedules pods on healthy nodes

Horizontal Pod Autoscaler

scaleTargetRef: deployment/order-service
minReplicas: 2
maxReplicas: 20
targetCPUUtilizationPercentage: 70

Conclusion

Kubernetes handles scheduling, scaling, self-healing, and service discovery — the operational foundation for running microservices at scale.

Share this article