Monoliths and microservices
A monolithic app packs every feature into one unit: change one part and you rebuild and redeploy the whole thing. Microservices split the app into small services that are deployed and scaled independently and talk over APIs. Each service is usually a container image, so the number of containers grows fast.
Container orchestrator
With hundreds of containers on dozens of nodes, you need a system that places containers on nodes, restarts them when they die, scales them and updates them without downtime. Kubernetes (K8s) is the open-source container orchestrator that does exactly that.
flowchart LR U["You: YAML manifest<br/>(desired state)"] -- "kubectl apply" --> API["Kubernetes API"] API --> C["Controllers compare<br/>desired vs actual"] C --> N["Pods on the nodes"] N -. "actual state" .-> C
- Declarative: you declare "web runs 3 replicas of
nginx:1.27" instead of giving step-by-step orders. Controllers keep pulling the cluster back to that state; when a pod dies, a new one is created. - Hardware abstraction: you declare the CPU/RAM you need and the scheduler picks a node from the shared resource pool.
- K8s runs OCI images — the same images you build with Docker; it does not replace Dockerfiles or registries.
For a small app of a few containers on one server, Docker Compose is often enough; K8s pays off as services, nodes and self-healing needs grow.
| Command | Meaning |
|---|---|
kubectl version |
kubectl (client) and cluster (server) versions |
kubectl apply -f app.yaml |
Send the desired state to the cluster |
What Kubernetes gives you
| Capability | In practice |
|---|---|
| Service discovery and load balancing | Pods find each other by DNS name; Services spread traffic |
| Rolling updates and rollback | New versions replace pods gradually; kubectl rollout undo goes back |
| Self-healing | Failed containers restart; pods on a dead node are recreated elsewhere |
| Configuration and secrets | ConfigMaps and Secrets injected without rebuilding images |
| Storage orchestration | Volumes from cloud disks or network storage attached automatically |
| Autoscaling | More pods with the Horizontal Pod Autoscaler, more nodes with a cluster autoscaler |
| Batch work | Jobs and CronJobs for one-off and scheduled tasks |
The ecosystem
Kubernetes came out of Google's internal Borg experience and was donated in 2015 to the Cloud Native Computing Foundation (CNCF), which also hosts Prometheus, Helm, containerd, and many other projects used in this track. You can run it in many forms: managed services (EKS, AKS, GKE), enterprise platforms (Red Hat OpenShift, Rancher), and lightweight distributions (k3s).
Learning locally
kind (Kubernetes in Docker), minikube, k3d, and the Kubernetes option in Docker Desktop each give you a working cluster on a laptop in minutes. kubectl reads cluster addresses and credentials from ~/.kube/config; kubectl config get-contexts lists clusters and kubectl config use-context kind-lab switches between them.
Costs to be honest about
Kubernetes adds moving parts: networking plugins, ingress controllers, certificates, upgrades every few months, and many YAML files. Teams need monitoring, security policies, and people who understand the platform. Managed services remove the control-plane work but not the need to learn how workloads, networking, and storage behave.
The modules that follow build up step by step: architecture, pods and namespaces, workloads, Services and Ingress, storage and configuration, access control, and finally Helm for packaging.