Session 0: what is Kubernetes
Starting a Kubernetes learning stream, one session at a time. Notes for future me and anyone else on the same path.
Session 0 sets the frame. Everything after builds on this.
What Kubernetes actually is.
Kubernetes is a system for running containers across a fleet of machines. You tell it what you want (“3 copies of this container, this much memory, exposed on this port”). It figures out which machine to run them on, restarts them if they crash, moves them if a machine dies, and keeps the count at 3. Forever, without you watching.
You describe desired state in YAML. Kubernetes continuously compares desired state to actual state and takes action to close the gap. That loop is called reconciliation.
Without Kubernetes, you would write scripts to do the same thing: start the container, monitor it, restart it, deploy the next version, roll back if it fails, scale up during traffic spikes. Kubernetes replaces those scripts with intent (“I want 3 replicas”) and a system that constantly enforces the intent.
What is inside it.
- Control plane. The brain. API server accepts your YAML. Scheduler decides which node runs what. Controllers run the reconciliation loops. etcd stores state.
- Nodes. The workers. Each runs a kubelet (agent that talks to the control plane) and a container runtime (containerd, usually).
- Pods. The smallest deployment unit. Wraps one or more containers.
- Services. How pods find each other on the network.
Why it exists.
Google ran their internal systems on a fleet manager called Borg for a decade. In 2014, they open-sourced the ideas as Kubernetes. It won the container orchestration wars against Mesos, Docker Swarm, and Nomad. Today every major cloud offers managed Kubernetes (EKS on AWS, GKE on GCP, AKS on Azure, OKE on OCI).
For an SRE.
Kubernetes is what you get when you decide that everything you do to keep a service running (restart, scale, deploy, roll back) should be declarative and automated. It is a giant control loop over a fleet, with a strong opinion that machines are cattle, not pets.
Next: Session 1, the pod is not a container.