Kubernetes Architecture

Concept

Kubernetes is a declarative system: you declare the desired state, and controllers continuously reconcile the actual state toward it.

It is split into:

  • Control plane – makes decisions (API server, scheduler, controller manager, etcd)
  • Worker nodes – run the workloads (kubelet, kube-proxy, container runtime)

Why it matters

Most Kubernetes problems can be categorized as:

  • Scheduling / placement
  • Runtime / container issues
  • Networking
  • Storage
  • Configuration / permissions
  • Control-plane health

Knowing which layer is broken focuses troubleshooting quickly.

Mental Model

User / CI
    ↓ (kubectl / API)
API Server
    ↓
etcd (desired state)
    ↓
Controllers + Scheduler
    ↓
kubelet on nodes → container runtime → Pods

Pods are the smallest deployable unit. Containers inside a Pod share network and storage namespaces.

Key Components

ComponentRole
kube-apiserverFront door for all API requests
etcdKey-value store for cluster state
kube-schedulerDecides which node a Pod runs on
controller-managerRuns controllers (Deployment, ReplicaSet, etc.)
kubeletNode agent – runs Pods
kube-proxyService networking / load balancing
container runtimecontainerd / CRI-O / Docker (legacy)

Key Commands

# Cluster overview
kubectl get nodes
kubectl get pods -A
kubectl get componentstatuses          # older clusters
kubectl get --raw='/readyz?verbose'    # API server health
 
# Control plane pods (usually in kube-system)
kubectl get pods -n kube-system
 
# Node details
kubectl describe node <node>

Common Failure Modes & Symptoms

SymptomTypical layer
Pods stuck in PendingScheduling / resources / taints
Pods in CrashLoopBackOffApplication / config / probes
Service not reachableNetworking / kube-proxy / CNI
Node NotReadykubelet / runtime / system
API server slow or unavailableControl plane / etcd

Investigation Tips

  • Start with kubectl get pods -A and kubectl get nodes.
  • Use kubectl describe heavily — Events at the bottom are often the fastest path to root cause.
  • Check kube-system pods when the cluster itself feels unhealthy.
  • Remember that kubectl talks to the API server; if the API is down, many commands will fail.

Personal Lessons Learned