Containers & Kubernetes
A deep-dive on Containers & Kubernetes — part of a 36-topic evergreen learning series.
Why this session matters
Part of a 36-topic learning series on engineering, ML, and LLM systems. Each session is a 90-minute deep-dive on one topic — designed so anyone can pick it up cold. Every two topics are followed by a revision session with recall prompts and hands-on drills.
Session 13 · SYS track ⚓
Containers changed how we ship software; Kubernetes changed how we run it at scale. This session covers Docker (images, layers, networking, volumes), K8s architecture (control plane, kubelet, etcd), core objects (Pod, Deployment, Service, Ingress, ConfigMap, Secret), and operational realities (rolling updates, HPA, resource requests/limits, debugging a crash-looping pod).
Pre-read (30 min before session)
Watch 1–2 of these before the deep-dive:
- Kubernetes in 100 Seconds — Fireship
- Docker Full Course — TechWorld with Nana
- Kubernetes Architecture Deep Dive — CNCF
Then skim the Kubernetes concepts overview.
Deep-dive (90 min)
1. Docker deep (25 min)
Image layers + copy-on-write. Multi-stage builds (small final images). Dockerfile best practices: order instructions by change frequency, use .dockerignore, non-root user, avoid latest tag. Networking: bridge, host, overlay. Volumes vs bind mounts. docker compose for local dev.
2. K8s architecture (25 min)
Control plane: API server, etcd, controller manager, scheduler. Node components: kubelet, kube-proxy, container runtime. How a Pod actually gets scheduled + started. CNI plugins (Calico, Cilium) for pod networking. CoreDNS for service discovery.
3. Core objects + patterns (25 min)
Pod (smallest unit). Deployment (declarative rollout, ReplicaSet under the hood). Service (ClusterIP/NodePort/LoadBalancer) + Endpoints. Ingress (L7 routing). ConfigMap + Secret. StatefulSet (stable identity, volumes). DaemonSet. Job/CronJob.
4. Operations (15 min)
Rolling updates + rollback. HPA (Horizontal Pod Autoscaler). Requests vs limits (throttling & OOMKill). Probes: liveness, readiness, startup. Debugging a crash-looping pod (kubectl describe, logs, exec).
Reading list
- Kubernetes Up & Running — Kelsey Hightower et al
- Kubernetes Patterns — Bilgin Ibryam & Roland Huss
- CNCF training: KCNA / CKAD
Research links
Hands-on drill
Spin up a local K8s cluster (kind or minikube). Deploy a 3-replica NGINX Deployment + ClusterIP Service. Curl it via kubectl port-forward. Kill a pod — watch replicas restore. Do a rolling update to a new image tag and observe the rollout.
Post-session checklist
- Can you explain what happens between
kubectl applyand a running Pod in 60 seconds? - Can you explain requests vs limits in 60 seconds?
- Can you explain liveness vs readiness probes in 60 seconds?
- Did you complete the hands-on drill above?
- Did you write 3 flashcards for tomorrow's recall?
- What's the one thing you'd want to revisit in the next revision session?
What's next
Session 14 continues the series. See the hub page for the full sequence and revision pattern.