chaidocs
docker-k8s-fundamentals

Kubernetes

Akash Kadlag 16 pages 6 min read Updated Nov 18, 2026
On this page
  1. **Kubernetes** for Dummies
  2. The conductor plays **nothing**
  3. Born at **Google**, given to everyone
  4. Desired state: a loop that **never** stops
  5. Imperative orders vs a **declared** goal
  6. K8S Vocabulary
  7. Architecture at a glance
  8. A **team**, not rivals
  9. Workflow
  10. Kubernetes is an ocean
  11. You describe the goal. Kubernetes **observes**, compares and acts and never stops checking.
  12. Where to read, play and keep learning
  13. Questions?
  14. Meme slide
  15. Your Next **Tech Partner**
Kubernetes for Dummies
chaicode.com
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.

The conductor plays nothing

The questionThe orchestrator's job
Which server has room?Scheduling
Who restarts it at 3 AM?Self-healing
Who starts more copies?Scaling
How do we update with zero downtime?Rolling updates
How do services find each other?Service discovery

An orchestra has 60 musicians; the conductor decides who plays what, and when.

In plain words

Orchestrator Software that decides where containers run and keeps them running

Cluster A group of machines managed as one

chaicode.com
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.

Born at Google, given to everyone

  1. 012014Open-sourced by Google, based on its internal system Borg
  2. 02CNCFNow run by the Cloud Native Computing Foundation, not by Google
  3. 03K8sK + 8 letters + s. Greek for helmsman - the one who steers the ship
  4. 04Docker + K8sDocker is the container; Kubernetes steers the ship
chaicode.com
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.

Desired state: a loop that never stops

You declare the goal. Kubernetes keeps making it true.

chaicode.com
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.

Two ways to ask

Imperative orders vs a declared goal

Imperative (old)

  • Start a container.
  • Start another.
  • Watch it.
  • Restart it if it dies.

Declarative (K8s)

  • replicas: 3
  • You describe the goal.
  • Kubernetes keeps making it true.
  • No 3 AM pager for you.
In plain words

Declarative You state the end result you want, not the steps to get there

replicas How many identical copies of a Pod should be running

chaicode.com
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.

K8S Vocabulary

ObjectWhat it is · think of it as
PodSmallest unit, 1+ containers, temporary · one running instance
DeploymentKeeps N Pods running, handles updates and rollbacks · a manager keeping headcount
ServiceA stable address in front of changing Pods · the company's main phone number
ConfigMap / SecretConfig kept outside the image · the settings file
In plain words

Pod The smallest thing Kubernetes runs - one or more containers together

Service One stable name and address, even as Pods come and go

chaicode.com
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.

Architecture at a glance

kubectlyour terminalAPI Serverthe front dooretcdcluster state DBSchedulerpicks a nodeController Mgrfix-the-difference loopskubeletnode agent · containerdPodsyour app1apply2store3new Pod4run it5startobserve
  1. 1kubectl talks to the API Server - the front door of the cluster
  2. 2The API Server saves the desired state in etcd, the cluster database
  3. 3The Scheduler picks a node with room for each new Pod
  4. 4The kubelet on that node starts and watches the Pod via containerd
  5. 5kube-proxy routes Service traffic to the right Pods; the Controller Manager loops forever
In plain words

Control plane The machines that decide - the brain

Worker node A machine that runs your containers

chaicode.com
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.

Configuration

deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: web
spec:
  replicas: 3              # desired state
  selector:
    matchLabels:
      app: web
  template:
    metadata:
      labels:
        app: web
    spec:
      containers:
        - name: web
          image: yourname/web:1.0   # the Docker image you built
          ports:
            - containerPort: 3000

terminal

kubectl apply -f deployment.yaml
kubectl get pods
kubectl delete pod <name>     # a new one appears: self-healing
kubectl scale deployment web --replicas=5
In plain words

kubectl The command-line tool that talks to the cluster

Labels Key/value tags that connect the Deployment to its Pods

chaicode.com
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.

Docker vs Kubernetes

A team, not rivals

DockerKubernetes
Build and run containersManage containers across machines
One machineA cluster
Scaling and healing: manualScaling and healing: automatic, declared
Best for dev, CI, small appsBest for production at scale
chaicode.com
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.

Workflow

  1. 01BuildBuild the image with Docker
  2. 02PushPush it to a registry under a name and tag, like yourname/web:1.0
  3. 03RunKubernetes pulls it and keeps the declared number of copies running
chaicode.com
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.

Kubernetes is an ocean

  • Networking and storage
  • Ingress and Helm
  • Autoscaling and security
  • Monitoring and GitOps...
chaicode.com
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.

The one thing to remember

You describe the goal. Kubernetes observes, compares and acts and never stops checking.
chaicode.com
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.

Where to read, play and keep learning

Three places to go after tonight.

  1. 01Readdocs.chaicode.com
  2. 02Play in the browserlabs.chaicode.com
  3. 03Learn DevOpsChaiCode DevOps Playlist on YouTube
chaicode.com
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.

Questions?

Ask anything expect relationship advice.

chaicode.com
Notes
Open the floor. Take questions from the chat.

Meme slide

15 A photograph of a young man standing outside in front of a red brick house with text overlaid on him.
Notes
Ab toh "2027 will be my year" bolne ki bhi himaat nahi hai
Your Next Tech Partner
chaicode.com
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.