docker-k8s-fundamentals
Kubernetes
On this page
- **Kubernetes** for Dummies
- The conductor plays **nothing**
- Born at **Google**, given to everyone
- Desired state: a loop that **never** stops
- Imperative orders vs a **declared** goal
- K8S Vocabulary
- Architecture at a glance
- A **team**, not rivals
- Workflow
- Kubernetes is an ocean
- You describe the goal. Kubernetes **observes**, compares and acts and never stops checking.
- Where to read, play and keep learning
- Questions?
- Meme slide
- Your Next **Tech Partner**
Notes
This is the second half of the evening: we have containers, now who runs a fleet of them?
Thirteen minutes, basics only. The goal is that Kubernetes stops sounding like magic and the YAML stops looking scary.
We will keep coming back to one loop. Everything else is built on it.
Notes
A container orchestrator does what the conductor does: it runs no app itself, but decides where every container goes and when.
Each of its jobs answers one of the five questions from the last slide.
Options exist: Kubernetes, Docker Swarm, Nomad, Amazon ECS. Kubernetes became the industry standard, so that is the one we look at.
Notes
Google had this pain years before the rest of us, because they were already running containers at huge scale.
Kubernetes is what they learned from Borg, given to everyone in 2014. Today it is run by the CNCF.
The name is Greek for helmsman. Docker is the container; Kubernetes is the one steering the ship.
Notes
You declare: I want 3 copies of web:1.0. Kubernetes observes 2 running, compares, finds 1 missing, and starts 1. Then it checks again. Forever.
Analogy: an AC thermostat. You set 24°C, and it keeps checking and adjusting. You never tell it when to switch the compressor on.
If you remember one thing about Kubernetes from tonight, remember this loop. Everything else is built on it.
Notes
The imperative way is a list of orders: start one, start another, watch, restart if it dies. You are the loop.
The declarative way is one line, replicas: 3. Kubernetes is the loop.
That shift — from giving orders to declaring a goal — is the whole point of the previous slide.
Notes
A Pod is the smallest unit: one or more containers. It is temporary — it can die and be replaced at any time.
A Deployment keeps N Pods running and handles updates and rollbacks. Think of a manager keeping headcount.
A Service is a stable address in front of changing Pods — the company's main phone number, no matter who picks up.
ConfigMap and Secret keep configuration outside the image, like a settings file.
Notes
Control plane, the brain: API Server (the front door kubectl talks to), etcd (the database of cluster state), Scheduler (picks a node for each new Pod), Controller Manager (runs the fix-the-difference loops).
Worker nodes, the muscle: kubelet (an agent that starts and watches Pods), kube-proxy (routes Service traffic to the right Pods), the container runtime containerd, and the Pods — your app.
Nobody needs to memorise these tonight. If late, say only: a brain that decides, and muscles that run your containers.
Notes
Slides only, no live cluster. Point at three things: replicas: 3 is the desired state; image: is what we built in the demo; the labels app: web connect the Deployment to its Pods.
kubectl apply hands the file to the API Server. kubectl get pods shows the three copies.
Delete a pod and a new one appears — that is self-healing, the loop in action. Scale to 5 and the loop makes 5 true.
I'm not teaching Kubernetes tonight. I just want this file to stop looking scary.
Notes
Docker builds and runs containers on one machine; Kubernetes manages containers across a cluster.
With Docker, scaling and healing are manual. With Kubernetes they are automatic, because you declared them.
Docker is best for dev, CI and small apps. Kubernetes is for production at scale. They are a team.
Notes
This is the whole pipeline in one line: build with Docker, push to a registry, Kubernetes runs it.
The image line in the YAML, yourname/web:1.0, is exactly the thing we pushed.
Nothing about the image changes between the laptop and the cluster — that is the point of containers.
Notes
Tonight: why it exists and the basic shape. Still ahead: networking, storage, Ingress, Helm, autoscaling, security, monitoring, GitOps, and more.
Kubernetes also has a price: it is complex. That is the new pain it leaves behind.
So we don't start here. We get Docker solid first, then come back for this ocean.
Notes
If you remember one thing about Kubernetes from tonight, remember this loop. Everything else — Deployments, Services, scaling, self-healing — is built on it.
You set the thermostat; you do not run the compressor. Kubernetes is the thermostat for your containers.
Next step: make Docker second nature, then come back for the rest of the ocean.
Notes
Read: docs.chaicode.com
Play in the browser: labs.chaicode.com
Learn DevOps: ChaiCode DevOps Playlist on YouTube
Three places to go after tonight.
Notes
Open the floor.
Take questions from the chat.
Meme slide
15
Notes
Ab toh
"2027 will be my year"
bolne ki bhi himaat
nahi hai
Notes
This is the line to land the chapter on: Kubernetes as your next tech partner.
Pause on the phrase and let it sit before moving on.
Keep it simple here — one statement, no detail; the detail comes in the slides that follow.