Big picture
From a build context to a Pod behind a Service
One small HTTP service, Signal, built and run with Docker on your computer, then declared to a Kubernetes cluster that kind runs as containers on that same computer. This picture puts every piece of the course on one scene.
Pick a journey: the dot is the request, the build or the declared state, and its letters are what it carries. Each stop says what is decided there and which lesson goes deeper. Click any piece, or any area, for its card.
Tags say how to see a stop for yourself: LAB with the course's commands, MODEL only in the lessons.
A · Build an image
context, cache, a pinned base, defaults
- You: docker build with the folder app as context, and a tag for the result. Lab Lesson 04 · Build an image
docker build -t prumathe-signal:1.0.0 app - Build context: The engine receives the context. COPY can only read files from it; .dockerignore leaves out what the image does not need. Lab Lesson 04 · Build an image
- Docker Engine: Each instruction is a step. Unchanged inputs reuse the cache; changing server.py rebuilds from its COPY on. Lab Lesson 04 · Build an image
docker build --progress=plain -t prumathe-signal:1.0.0 app - Base image [by digest]: FROM names the base by digest: exactly that content, whatever the tag points to today. What the dot carries: Base digest. Lab Lesson 11 · Tags, digests and delivery
docker pull python:3.14.8-alpine3.24@sha256:f6a589d43c42b9e7f7dc67a12d37132491f362859a5d750607710cc56da3bc72 - Docker Engine: USER 10001 and CMD become the image's defaults; APP_VERSION is a build argument with no secret in it. EXPOSE documents 8080 and publishes nothing. What the dot carries: Base digest. Lab Lesson 04 · Build an image
- Image [1.0.0]: prumathe-signal:1.0.0: layers plus configuration. The tag is a name; another tag can point to the same image ID. What the dot carries: Image. Lab Lesson 03 · Images and layers
docker image inspect --format '{{.Config.User}} {{json .Config.Cmd}}' prumathe-signal:1.0.0
End of the journey: The image is an artifact with layers and defaults, built from a context you chose and a base pinned by digest. Running it is the next step.
B · Run Signal with Compose
a process, its limits, its health
- You: docker compose up -d --wait app, in the project prumathe-dk. Lab Lesson 08 · Describe the local system
docker compose up -d --wait app - Docker Engine: Compose asks the engine for the project network, the volume and the container app, with 0.5 CPU and 128 MiB. What the dot carries: Image. Lab Lesson 08 · Describe the local system
- Container app [running]: Its main process is server.py as UID 10001, with an isolated view of processes, network and files, on the host's kernel. What the dot carries: Image. Lab Lesson 01 · A process with boundaries
- Container app [healthy]: The image's health check probes /health; --wait returned once the service was healthy. Lab Lesson 10 · Health and resource limits
docker compose exec -T app python /app/probe.py http://127.0.0.1:8080/health ok - Container app [unhealthy]: Create /tmp/fail-live and /health answers 503. Lab Lesson 10 · Health and resource limits
docker compose exec -T app touch /tmp/fail-live - Docker Engine [still running]: The engine reports unhealthy, and running: it does not restart a container for being unhealthy. Lab Lesson 10 · Health and resource limits
docker inspect --format '{{.State.Health.Status}} {{.State.Running}}' prumathe-dk-app-1 - Container app [healthy]: Remove the file and the next checks recover. Lab Lesson 10 · Health and resource limits
docker compose exec -T app rm /tmp/fail-live
End of the journey: A container is a process with boundaries and limits. Healthy is a property one probe measures; running is another, and Docker does not restart a container for being unhealthy.
C · Names and ports
a published port, a service name, localhost
- Your browser: Your browser asks 127.0.0.1:18080. What the dot carries: HTTP request. Lab Lesson 07 · Publish a port deliberately
- Container app [200]: Compose published loopback port 18080 to container port 8080, where Signal listens on 0.0.0.0. What the dot carries: HTTP request. Lab Lesson 07 · Publish a port deliberately
docker compose port app 8080 - toolbox: Inside toolbox, localhost is toolbox itself. Lab Lesson 06 · Names on a network
- Container app [app resolves]: The name app resolves on the project network, so app:8080 reaches Signal from any container on it. What the dot carries: HTTP request. Lab Lesson 06 · Names on a network
docker compose run --rm --no-deps --entrypoint python toolbox -c "import socket; print(socket.gethostbyname('app'))" - Container app: Check one layer at a time: the name, the connection, the status, the text. probe.py asserts the status and the expected text. Lab Lesson 12 · Follow the evidence
docker compose run --rm --no-deps toolbox http://app:8080 hello-compose - toolbox: A shared network lets the request through; it does not authenticate it. Model Lesson 06 · Names on a network
End of the journey: The browser uses the published host port; containers on the project network use the service name and the internal port. Reachable is not authorized.
D · Data that outlives a container
a named volume across a replacement
- Container app: Write a marker in /data, where Compose mounts the named volume signal-data. What the dot carries: Marker file. Lab Lesson 05 · Data that outlives a container
docker compose exec -T app sh -c 'echo volume-survived > /data/marker' - Volume signal-data: The bytes land in the volume, not in the container's writable layer. What the dot carries: Marker file. Lab Lesson 05 · Data that outlives a container
- Docker Engine [replaced]: Recreate the container: the old one and its writable layer are removed. Lab Lesson 05 · Data that outlives a container
docker compose up -d --wait --force-recreate app - Container app: The new container mounts the same volume at /data. Lab Lesson 05 · Data that outlives a container
- Volume signal-data [survived]: The marker is still there. What the dot carries: Marker file. Lab Lesson 05 · Data that outlives a container
docker compose exec -T app cat /data/marker - Volume signal-data: docker compose down keeps named volumes; down -v deletes them. Neither a volume nor a bind mount is a backup. Model Lesson 05 · Data that outlives a container
End of the journey: The writable layer dies with its container; the named volume does not. Keeping data is not backing it up.
E · Into the cluster
a context, two nodes, a loaded image
- kubectl: Every command names the course kubeconfig and the context kind-prumathe-dk: the destination is explicit. Lab Lesson 13 · Meet the cluster
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk get nodes - API server [2 nodes Ready]: The API server answers: a control-plane node and a worker, both Docker containers on your computer. Lab Lesson 13 · Meet the cluster
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk wait --for=condition=Ready nodes --all --timeout=90s - kubelet: On each node, a kubelet runs the Pods assigned to it through the node's container runtime. Lab Lesson 13 · Meet the cluster
- containerd: The worker's containerd has its own image store: your local image is not there yet. Lab Lesson 11 · Tags, digests and delivery
- Image: prumathe-signal:1.0.0 exists in your Docker Engine. What the dot carries: Image. Lab Lesson 11 · Tags, digests and delivery
- containerd [loaded]: kind load docker-image copies it into the node. With imagePullPolicy: Never, a missing import fails visibly instead of downloading. What the dot carries: Image. Lab Lesson 11 · Tags, digests and delivery
kind load docker-image prumathe-signal:1.0.0 --name prumathe-dk
End of the journey: The cluster runs in containers on your computer: real Kubernetes, one shared failure domain. Its nodes have their own image store.
F · Declare a Deployment
apply, store, reconcile, schedule, run
- kubectl: apply sends the desired state: a Deployment of two replicas and a Service. What the dot carries: Desired state. Lab Lesson 15 · Desired and observed state
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab apply -f k8s/base.yaml - API server [accepted]: The API server authenticates, authorizes and validates the request, then accepts it. Accepted means stored, not running. What the dot carries: Desired state. Lab Lesson 15 · Desired and observed state
- etcd: The objects are stored in etcd. What the dot carries: Desired state. Model Lesson 15 · Desired and observed state
- Deployment signal: The Deployment signal: a Pod template labeled app=signal and replicas: 2. What the dot carries: Desired state. Lab Lesson 16 · Keep replicas running
- Controllers [ReplicaSet]: The Deployment controller creates a ReplicaSet; the ReplicaSet controller creates two Pod objects to match the count. Lab Lesson 16 · Keep replicas running
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab get deployment,replicaset,pod -l app=signal - Scheduler [worker]: The scheduler finds Pods with no node and binds them where their requests fit: 50m CPU and 32Mi each. Lab Lesson 21 · Requests, limits and placement
- kubelet: The worker's kubelet sees two Pods bound to its node. Lab Lesson 13 · Meet the cluster
- containerd: containerd starts their containers from the loaded image. What the dot carries: Image. Lab Lesson 11 · Tags, digests and delivery
- signal Pods [2/2 Ready]: The startup probe passes, then readiness: two Pods Ready. Lab Lesson 15 · Desired and observed state
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab rollout status deployment/signal --timeout=90s
End of the journey: You declared what should exist; the control plane made it so and keeps doing so after kubectl exits. Accepted, scheduled, running and ready are four different moments.
G · A request through a Service
a stable name, ready endpoints, readiness
- signal Pods: kubectl exec runs probe.py inside a signal Pod: GET http://signal. What the dot carries: HTTP request. Lab Lesson 17 · A stable front door
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab exec deployment/signal -- python /app/probe.py http://signal 1.0.0 200 30 - Service signal: The name signal resolves to the Service's virtual IP, on port 80. What the dot carries: HTTP request. Lab Lesson 17 · A stable front door
- Service signal [2 endpoints]: It selects Pods labeled app=signal; its EndpointSlice lists their addresses and whether each is ready. Lab Lesson 17 · A stable front door
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab get endpointslices -l kubernetes.io/service-name=signal -o yaml - signal Pods [200]: The request reaches a ready Pod on targetPort 8080. What the dot carries: HTTP request. Lab Lesson 17 · A stable front door
- kubelet [not ready]: In the lab's probe Pod, /ready starts failing. The kubelet marks the Pod not ready and leaves its container running. Lab Lesson 20 · Alive, ready, started
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab exec probe -- touch /tmp/not-ready - Service signal [no traffic]: The not-ready Pod is marked not ready in the EndpointSlice: its Service stops sending it traffic. Lab Lesson 20 · Alive, ready, started
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab get endpointslices -l kubernetes.io/service-name=probe-entry -o yaml - kubelet [ready]: Remove the file and readiness passes again. A failing liveness probe, on /health, would restart the container instead. Lab Lesson 20 · Alive, ready, started
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab exec probe -- rm /tmp/not-ready
End of the journey: The Service gives clients a stable name over Pods that come and go; readiness decides which of them receive traffic, without restarting anything.
H · Pods replaced, Pods pending
the count is kept; capacity is real
- kubectl: Delete the signal Pods. Lab Lesson 16 · Keep replicas running
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab delete pod -l app=signal --wait=true - API server: The API server records the deletion. Lab Lesson 16 · Keep replicas running
- kubelet [stopped]: The kubelet stops their containers. What they wrote in their writable layers is gone. Lab Lesson 16 · Keep replicas running
- Controllers [0 of 2]: The ReplicaSet sees 0 of 2 and creates two new Pods: the desired count never changed. Lab Lesson 16 · Keep replicas running
- Scheduler: The new Pods are bound to the worker. Lab Lesson 21 · Requests, limits and placement
- signal Pods [2/2, new names]: Two Pods again, with new names, UIDs and IPs. The Service keeps finding them by label. Lab Lesson 24 · Deploy, break, recover
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab rollout status deployment/signal --timeout=90s - Scheduler [Pending]: Now a Pod that requests 1000 CPUs: no node fits, so it stays Pending and describe shows FailedScheduling with the reason. Lab Lesson 21 · Requests, limits and placement
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab describe pod no-room
End of the journey: Controllers keep the count, not the instances: replacements are new Pods. And a desired count needs real capacity: what fits nowhere waits Pending.
I · Roll out, roll back
a new template, one Pod at a time
- Docker Engine: Build version 1.1.0. What the dot carries: Image. Lab Lesson 22 · Change versions with a way back
docker build --build-arg APP_VERSION=1.1.0 -t prumathe-signal:1.1.0 app - Image: prumathe-signal:1.1.0 exists in your Docker Engine. What the dot carries: Image. Lab Lesson 22 · Change versions with a way back
- containerd [loaded]: Load it into the node. Forgetting this leaves the new Pods unable to start. What the dot carries: Image. Lab Lesson 22 · Change versions with a way back
kind load docker-image prumathe-signal:1.1.0 --name prumathe-dk - kubectl: set image changes the Deployment's Pod template. What the dot carries: Desired state. Lab Lesson 22 · Change versions with a way back
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab set image deployment/signal app=prumathe-signal:1.1.0 - Controllers [surge 1, unavailable 0]: A new template means a new ReplicaSet, scaled up one Pod at a time: maxSurge 1, maxUnavailable 0. Lab Lesson 22 · Change versions with a way back
- signal Pods [1.1.0]: Each new Pod must be ready before an old one goes. The probe now sees 1.1.0. Lab Lesson 22 · Change versions with a way back
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab exec deployment/signal -- python /app/probe.py http://signal 1.1.0 200 30 - kubectl [back to 1.0.0]: rollout undo restores the previous template. It does not undo a migration, external data or a separate ConfigMap. Lab Lesson 22 · Change versions with a way back
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab rollout undo deployment/signal
End of the journey: A rollout replaces Pods through a new ReplicaSet, never below the desired count here. Rollback restores a template, not the data or the configuration around it.
J · Configuration and secrets
read at start, encoded not encrypted
- kubectl: apply a ConfigMap and a Secret. What the dot carries: MESSAGE, Fake token. Lab Lesson 18 · Inject runtime configuration
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab apply -f k8s/config.yaml - ConfigMap, Secret: signal-settings holds MESSAGE. demo-token holds a fake token, base64 encoded, and not encrypted in etcd by default. What the dot carries: MESSAGE, Fake token. Lab Lesson 18 · Inject runtime configuration
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab get secret demo-token - kubectl: set env --from adds references to its keys in the Deployment's Pod template. What the dot carries: MESSAGE. Lab Lesson 18 · Inject runtime configuration
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab set env deployment/signal --from=configmap/signal-settings - Controllers [rollout]: A changed template means a rollout. Lab Lesson 18 · Inject runtime configuration
- signal Pods [hello-kubernetes]: The new Pods read MESSAGE when they start. What the dot carries: MESSAGE. Lab Lesson 18 · Inject runtime configuration
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab exec deployment/signal -- python /app/probe.py http://signal hello-kubernetes 200 30 - ConfigMap, Secret: Changing only the ConfigMap would change no running process: environment is read at start. Mounted files can update eventually, if the application rereads them. Model Lesson 18 · Inject runtime configuration
End of the journey: Configuration reaches a process when it starts, so changing it means a rollout. A Secret has its own access controls, but base64 is not encryption.
K · Storage beyond a Pod
a claim that outlives its Pod
- kubectl: apply a claim and a Pod that uses it. What the dot carries: Desired state. Lab Lesson 19 · Storage beyond a Pod
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab apply -f k8s/storage.yaml - PVC notebook [Bound]: PVC notebook asks for 64Mi, ReadWriteOnce. kind's local provisioner creates a volume and binds it. Lab Lesson 19 · Storage beyond a Pod
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab get pvc notebook - Pod writer: Pod writer mounts the claim at /data and writes a marker. What the dot carries: Marker file. Lab Lesson 19 · Storage beyond a Pod
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab exec writer -- sh -c 'echo pvc-survived > /data/marker' - Pod writer [deleted]: Delete only the Pod. Nothing recreates a bare Pod. Lab Lesson 19 · Storage beyond a Pod
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab delete pod writer --wait=true - PVC notebook [still Bound]: The claim and its volume remain. What the dot carries: Marker file. Lab Lesson 19 · Storage beyond a Pod
- Pod writer [survived]: Apply the manifest again: a new writer Pod with the same claim reads the marker. What the dot carries: Marker file. Lab Lesson 19 · Storage beyond a Pod
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab exec writer -- cat /data/marker
End of the journey: The claim and its volume outlive the Pod that wrote to them. This storage lives in the local kind environment: it is not replicated and not a backup.
L · Who may do what
a ServiceAccount, a Role, a RoleBinding
- kubectl: apply the ServiceAccount observer, the Role pod-reader and a RoleBinding between them. Lab Lesson 23 · Grant only the needed verbs
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab apply -f k8s/rbac.yaml - API server: Ask as observer: the administrator impersonates it with --as, which needs permission too. What the dot carries: Caller identity. Lab Lesson 23 · Grant only the needed verbs
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab auth can-i list pods --as=system:serviceaccount:dk-lab:observer - RBAC authorizer [list pods: yes]: RoleBinding observer-reads-pods gives observer the Role pod-reader: get, list and watch on Pods in dk-lab. What the dot carries: Caller identity. Lab Lesson 23 · Grant only the needed verbs
- RBAC authorizer [get secrets: no]: Nothing grants secrets, and RBAC has no deny rules: what is not granted is refused. What the dot carries: Caller identity. Lab Lesson 23 · Grant only the needed verbs
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab auth can-i get secrets --as=system:serviceaccount:dk-lab:observer - API server [delete pods: no]: Deleting Pods is refused too. Authorization says nothing about network reach or the application's own login. Lab Lesson 23 · Grant only the needed verbs
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab auth can-i delete pods --as=system:serviceaccount:dk-lab:observer
End of the journey: The observer may read Pods in dk-lab and nothing else. Grant the verbs a workload needs; what nobody granted is refused.
Areas
- Registry · Docker Hub
- Where images are stored and distributed, here Docker Hub. The course's build starts from a base image pulled from it and pinned by its digest, so the build always starts from the same content. What it does not do: The course publishes nothing to it, and the cluster never pulls Signal from it: the image reaches kind's node with kind load. A tag is a name that can move; only the digest identifies content. Lesson 03 · Images and layers, Lesson 11 · Tags, digests and delivery
- Your computer · Docker Engine
- Where everything runs: you with docker, docker compose, kind and kubectl, the build context, the images that Docker Engine keeps, your browser and the Compose project. The kind cluster runs here too: its nodes are containers on this same computer. What it does not do: A container does not get its own kernel: every container here shares this computer's kernel. Nothing here is a production deployment, and the lab never prunes Docker resources that are not the course's. Lesson 01 · A process with boundaries, Lesson 03 · Images and layers, Lesson 13 · Meet the cluster
- Compose project prumathe-dk
- The local system that docker compose describes and runs: the app and toolbox services on the project's network, the named volume signal-data and the port published on your computer's loopback. Compose names them with the project name as prefix. What it does not do: It is not an orchestrator: it runs on one Docker Engine, on this computer. docker compose down removes the containers and the network but keeps the volume; down -v deletes it too. Lesson 05 · Data that outlives a container, Lesson 08 · Describe the local system
- Network prumathe-dk_default
- The network that Compose created for the project. Inside it, each service is reachable by its name: toolbox reaches app at app:8080. Your browser reaches app from outside, through the published port. What it does not do: Names resolve only inside it: from your computer, app means nothing. Inside a container, localhost is that container itself. Lesson 06 · Names on a network, Lesson 07 · Publish a port deliberately
- kind cluster prumathe-dk · its nodes are containers on your computer
- A Kubernetes cluster that kind runs as Docker containers on your computer: one container is the control-plane node and another is the worker node. kubectl reaches its API server with the course kubeconfig and the context kind-prumathe-dk. What it does not do: It is a learning cluster, not a production one: one control-plane node, local storage and images loaded by hand. Deleting it deletes everything declared in it, the data of the PVC included. Lesson 13 · Meet the cluster, Lesson 15 · Desired and observed state
- Control plane · node prumathe-dk-control-plane
- The part of the cluster that keeps and reconciles the desired state: the API server, the only door; etcd, where every object is stored; the scheduler, which binds Pods to nodes; the controllers, which close the gap between desired and observed; and RBAC, which decides who may do what. What it does not do: It does not run your containers: the kubelet of each node does. An object it accepts is stored, not yet ready. Lesson 13 · Meet the cluster, Lesson 15 · Desired and observed state, Lesson 23 · Grant only the needed verbs
- dk-lab objects
- The objects declared in the namespace dk-lab: the Deployment signal and its ReplicaSets, the Service signal, the ConfigMap and the Secret, and the PVC notebook. Each one records desired state in the API server. What it does not do: An object runs nothing by itself: controllers and kubelets act on it. Deleting the namespace deletes them all. Lesson 15 · Desired and observed state, Lesson 16 · Keep replicas running, Lesson 17 · A stable front door
- Worker node
- The node where the course's Pods run: its kubelet starts them through containerd and runs their probes, and containerd keeps the node's own images, where kind load puts prumathe-signal. What it does not do: It does not decide where Pods go, or how many there are: the scheduler and the controllers do. A Pod replaced here is a new Pod, with a new name and a new IP. Lesson 14 · The Pod boundary, Lesson 20 · Alive, ready, started, Lesson 21 · Requests, limits and placement
Pieces
- Base image · python:3.14.8-alpine3.24, by digest
- The image the Dockerfile starts FROM, stored in a registry and pinned by its digest, so the build always starts from the same content. What it does not do: A tag alone is a name that can move; the digest is what identifies content. The course publishes nothing to a registry. Lesson 11 · Tags, digests and delivery, Lesson 04 · Build an image
- You · docker, compose, kind
- Where every command starts: docker builds and runs, docker compose describes the local system, kind creates the cluster. What it does not do: The lab never asks you to prune Docker resources that are not the course's. Lesson 00 · Before you start, Lesson 08 · Describe the local system
- Build context · labs/app
- The folder sent to the build: Dockerfile, server.py and probe.py. COPY can only read from it; .dockerignore keeps the rest out. What it does not do: A secret placed here or passed as a build argument ends up inside the image. Lesson 04 · Build an image
- Docker Engine · builds images, runs containers
- The daemon behind every docker command: it builds images, keeps them, and creates, starts and stops containers. Compose talks to it too. What it does not do: An unhealthy container is not restarted for being unhealthy; restart policies are about the process exiting. Lesson 01 · A process with boundaries, Lesson 02 · Start, stop, remove, Lesson 10 · Health and resource limits
- kubectl · context kind-prumathe-dk
- The client that sends requests to the API server. Every command of the course names the course kubeconfig and the context kind-prumathe-dk. What it does not do: kubectl does not run anything on the nodes; when it exits, the control plane keeps reconciling. Lesson 13 · Meet the cluster, Lesson 15 · Desired and observed state
- Image · prumathe-signal, 1.0.0
- Filesystem layers plus configuration: USER 10001, CMD and APP_VERSION. It is the artifact, not a running process. What it does not do: A container's writes never change it, and an image in your Docker is not on a Kubernetes node until it is loaded there. Lesson 03 · Images and layers, Lesson 11 · Tags, digests and delivery
- toolbox · probe.py, a client
- A second container from the same image that runs probe.py against app: it checks name resolution, connection, status and text separately. What it does not do: Inside it, localhost is the toolbox itself, not app and not your computer. Lesson 06 · Names on a network, Lesson 12 · Follow the evidence
- Container app · server.py, UID 10001
- Signal running: a process with an isolated view of processes, network and files, a writable layer of its own, 0.5 CPU and 128 MiB, and a health check on /health. What it does not do: It shares your computer's kernel, and running as UID 10001 reduces privileges without making untrusted code harmless. Lesson 01 · A process with boundaries, Lesson 02 · Start, stop, remove, Lesson 08 · Describe the local system, Lesson 10 · Health and resource limits
- Volume signal-data · mounted at /data
- A named volume that Docker manages and Compose mounts at /data. It outlives the container that wrote to it. What it does not do: It is not a backup, and docker compose down -v deletes it. Lesson 05 · Data that outlives a container
- Your browser · 127.0.0.1:18080
- A client outside every container. It reaches Signal through the port Compose published on your computer's loopback. What it does not do: The name app means nothing here: it only resolves inside the project network. Lesson 07 · Publish a port deliberately
- etcd · the stored state
- The key-value store behind the API server: every object, desired and observed, lives here. What it does not do: Nothing talks to it but the API server. Secrets are not encrypted in it by default. Lesson 15 · Desired and observed state, Lesson 18 · Inject runtime configuration
- Scheduler · picks a node
- It finds Pods with no node and binds each to a node where its requests fit, along with constraints such as taints. What it does not do: It does not start containers, and live usage does not erase declared requests: a Pod that fits nowhere stays Pending. Lesson 21 · Requests, limits and placement
- Controllers · close the gap
- Loops that compare desired and observed state and act to reduce the difference: the Deployment controller manages ReplicaSets, the ReplicaSet controller keeps the Pod count. What it does not do: A bare Pod has no controller: delete it and nothing brings it back. Lesson 15 · Desired and observed state, Lesson 16 · Keep replicas running, Lesson 14 · The Pod boundary
- RBAC authorizer · Roles and RoleBindings
- How the API server decides whether a caller may perform a verb on a resource: a Role lists permissions, a RoleBinding gives them to a subject. What it does not do: RBAC permissions only add up; there is no deny rule. It says nothing about network reach or application login. Lesson 23 · Grant only the needed verbs
- API server · every request goes through here
- The front door of the cluster. It authenticates and authorizes each request, validates objects, stores them in etcd, and is what controllers, the scheduler and kubelets watch. What it does not do: Accepting an object means it was stored, not that its Pods are ready. Lesson 13 · Meet the cluster, Lesson 15 · Desired and observed state
- Deployment signal · 2 replicas, ReplicaSets
- A Pod template and a desired count. Each template change creates a new ReplicaSet; a rolling update moves Pods from the old one to the new one. What it does not do: rollout undo restores a template, not a database, external data or a separate ConfigMap. Lesson 16 · Keep replicas running, Lesson 22 · Change versions with a way back
- Service signal · port 80 to 8080
- A stable name and virtual IP that select Pods by the label app=signal. Its EndpointSlices list the ready backends. What it does not do: Type ClusterIP: reachable only inside the cluster. A DNS answer does not prove a healthy application. Lesson 17 · A stable front door
- ConfigMap, Secret · signal-settings, demo-token
- ConfigMap signal-settings holds MESSAGE; Secret demo-token holds a clearly fake token. Pods can read them as environment variables or files. What it does not do: base64 is encoding, not encryption. Changing a ConfigMap does not change the environment of a process already running. Lesson 18 · Inject runtime configuration, Lesson 09 · Configuration and secrets
- PVC notebook · 64Mi, ReadWriteOnce
- A claim for storage. kind's local provisioner creates a PersistentVolume for it; the claim outlives the Pods that mount it. What it does not do: ReadWriteOnce means one node, not one Pod. This storage is local to kind: deleting the cluster loses it. Lesson 19 · Storage beyond a Pod
- kubelet · runs Pods, probes them
- The agent on each node: it runs the Pods bound to its node through the container runtime, and runs their startup, readiness and liveness probes. What it does not do: Readiness only gates traffic; liveness restarts the container. Neither replaces a deleted Pod: that is a controller's job. Lesson 20 · Alive, ready, started, Lesson 13 · Meet the cluster
- containerd · the node's images
- The container runtime of the node, with its own image store. kind load docker-image copies your local image into it. What it does not do: With imagePullPolicy: Never it never downloads: a missing image fails with ErrImageNeverPull. Lesson 11 · Tags, digests and delivery, Lesson 22 · Change versions with a way back
- signal Pods · 2 replicas, each with its own name and IP
- The running replicas: each Pod has one container from prumathe-signal, a name, a UID and an IP of its own, requests of 50m CPU and 32Mi, and three probes. What it does not do: A Pod's identity is temporary: a replacement is a new Pod with a new name, and the files it wrote do not carry over. Lesson 14 · The Pod boundary, Lesson 16 · Keep replicas running, Lesson 21 · Requests, limits and placement
- Pod writer · notebook at /data
- A bare Pod that mounts the claim notebook at /data and writes a marker there. What it does not do: Being bare, nothing recreates it when it is deleted; applying the manifest again does. Lesson 19 · Storage beyond a Pod
What travels
- I · Image
- prumathe-signal: layers and configuration, identified by an image ID. Comes from: docker build, from the build context. Ends up: Your Docker Engine, and a node's containerd after kind load.
- G · Base digest
- The sha256 digest that pins the base image's content. Comes from: The registry. Ends up: FROM in the Dockerfile, and the image built on it.
- R · HTTP request
- A GET to Signal, which answers with its message and its version. Comes from: Your browser, toolbox, or probe.py inside a Pod. Ends up: A process listening on port 8080.
- K · Marker file
- A small file written to /data to test what survives a replacement. Comes from: A container or a Pod. Ends up: A named volume, or the volume behind a claim.
- M · Desired state
- Objects described in a manifest: kind, metadata and spec. Comes from: kubectl apply, or an imperative command. Ends up: etcd, through the API server; controllers act on it.
- E · MESSAGE
- A runtime setting read by the process when it starts. Comes from: An environment variable: Compose, docker run -e, or a ConfigMap. Ends up: The environment of a new process.
- S · Fake token
- A deliberately fake credential, to show where secrets go and what protects them. Comes from: demo-token.txt in Compose; Secret demo-token in Kubernetes. Ends up: A file mount, or the Secret object behind the API.
- A · Caller identity
- Who a request comes from: here, the ServiceAccount observer. Comes from: kubectl, impersonating with --as. Ends up: The API server, which authenticates it and asks RBAC.
Panorama
De un contexto de build a un Pod detrás de un Service
Un servicio HTTP chico, Signal, construido y ejecutado con Docker en tu computadora, y después declarado a un clúster de Kubernetes que kind corre como contenedores en esa misma computadora. Este dibujo pone en una escena todas las piezas del curso.
Elegí un recorrido: el punto es el pedido, el build o el estado declarado, y sus letras son lo que lleva. Cada parada dice qué se decide ahí y qué lección lo profundiza. Hacé clic en cualquier pieza, o en cualquier zona, para ver su ficha.
Las etiquetas dicen cómo ver cada parada por tu cuenta: LABORATORIO con los comandos del curso, MODELO solo en las lecciones.
A · Construir una imagen
contexto, caché, una base fijada, valores por defecto
- Vos: docker build con la carpeta app como contexto, y un tag para el resultado. Laboratorio Lección 04 · Construí una imagen
docker build -t prumathe-signal:1.0.0 app - Contexto de build: El engine recibe el contexto. COPY solo puede leer archivos de ahí; .dockerignore deja afuera lo que la imagen no necesita. Laboratorio Lección 04 · Construí una imagen
- Docker Engine: Cada instrucción es un paso. Si los insumos no cambian, se reusa la caché; cambiar server.py reconstruye desde su COPY en adelante. Laboratorio Lección 04 · Construí una imagen
docker build --progress=plain -t prumathe-signal:1.0.0 app - Imagen base [por digest]: FROM nombra la base por digest: exactamente ese contenido, apunte adonde apunte hoy el tag. Qué lleva el punto: Digest base. Laboratorio Lección 11 · Tags, digests y distribución
docker pull python:3.14.8-alpine3.24@sha256:f6a589d43c42b9e7f7dc67a12d37132491f362859a5d750607710cc56da3bc72 - Docker Engine: USER 10001 y CMD pasan a ser los valores por defecto de la imagen; APP_VERSION es un argumento de build sin secretos. EXPOSE documenta 8080 y no publica nada. Qué lleva el punto: Digest base. Laboratorio Lección 04 · Construí una imagen
- Imagen [1.0.0]: prumathe-signal:1.0.0: capas más configuración. El tag es un nombre; otro tag puede apuntar al mismo ID de imagen. Qué lleva el punto: Imagen. Laboratorio Lección 03 · Imágenes y capas
docker image inspect --format '{{.Config.User}} {{json .Config.Cmd}}' prumathe-signal:1.0.0
Fin del recorrido: La imagen es un artefacto con capas y valores por defecto, construida desde un contexto que elegiste y una base fijada por digest. Ejecutarla es el paso siguiente.
B · Ejecutar Signal con Compose
un proceso, sus límites, su salud
- Vos: docker compose up -d --wait app, en el proyecto prumathe-dk. Laboratorio Lección 08 · Describí el sistema local
docker compose up -d --wait app - Docker Engine: Compose le pide al engine la red del proyecto, el volumen y el contenedor app, con 0,5 CPU y 128 MiB. Qué lleva el punto: Imagen. Laboratorio Lección 08 · Describí el sistema local
- Contenedor app [running]: Su proceso principal es server.py como UID 10001, con una vista aislada de procesos, red y archivos, sobre el kernel del host. Qué lleva el punto: Imagen. Laboratorio Lección 01 · Un proceso con límites
- Contenedor app [healthy]: El health check de la imagen prueba /health; --wait volvió cuando el servicio quedó healthy. Laboratorio Lección 10 · Salud y límites de recursos
docker compose exec -T app python /app/probe.py http://127.0.0.1:8080/health ok - Contenedor app [unhealthy]: Creá /tmp/fail-live y /health responde 503. Laboratorio Lección 10 · Salud y límites de recursos
docker compose exec -T app touch /tmp/fail-live - Docker Engine [sigue running]: El engine informa unhealthy, y running: no reinicia un contenedor por estar unhealthy. Laboratorio Lección 10 · Salud y límites de recursos
docker inspect --format '{{.State.Health.Status}} {{.State.Running}}' prumathe-dk-app-1 - Contenedor app [healthy]: Borrá el archivo y los próximos chequeos se recuperan. Laboratorio Lección 10 · Salud y límites de recursos
docker compose exec -T app rm /tmp/fail-live
Fin del recorrido: Un contenedor es un proceso con límites. Healthy es una propiedad que mide un probe; running es otra, y Docker no reinicia un contenedor por estar unhealthy.
C · Nombres y puertos
un puerto publicado, un nombre de servicio, localhost
- Tu navegador: Tu navegador pide 127.0.0.1:18080. Qué lleva el punto: Pedido HTTP. Laboratorio Lección 07 · Publicá un puerto a propósito
- Contenedor app [200]: Compose publicó el puerto 18080 del loopback hacia el puerto 8080 del contenedor, donde Signal escucha en 0.0.0.0. Qué lleva el punto: Pedido HTTP. Laboratorio Lección 07 · Publicá un puerto a propósito
docker compose port app 8080 - toolbox: Adentro de toolbox, localhost es el propio toolbox. Laboratorio Lección 06 · Nombres en una red
- Contenedor app [app resuelve]: El nombre app se resuelve en la red del proyecto, así que app:8080 llega a Signal desde cualquier contenedor de esa red. Qué lleva el punto: Pedido HTTP. Laboratorio Lección 06 · Nombres en una red
docker compose run --rm --no-deps --entrypoint python toolbox -c "import socket; print(socket.gethostbyname('app'))" - Contenedor app: Revisá una capa por vez: el nombre, la conexión, el estado, el texto. probe.py comprueba el estado y el texto esperado. Laboratorio Lección 12 · Seguí la evidencia
docker compose run --rm --no-deps toolbox http://app:8080 hello-compose - toolbox: Una red compartida deja pasar el pedido; no lo autentica. Modelo Lección 06 · Nombres en una red
Fin del recorrido: El navegador usa el puerto publicado en el host; los contenedores de la red del proyecto usan el nombre de servicio y el puerto interno. Alcanzable no es autorizado.
D · Datos que sobreviven al contenedor
un volumen con nombre a través de un reemplazo
- Contenedor app: Escribí una marca en /data, donde Compose monta el volumen con nombre signal-data. Qué lleva el punto: Archivo marca. Laboratorio Lección 05 · Datos que sobreviven al contenedor
docker compose exec -T app sh -c 'echo volume-survived > /data/marker' - Volumen signal-data: Los bytes quedan en el volumen, no en la capa escribible del contenedor. Qué lleva el punto: Archivo marca. Laboratorio Lección 05 · Datos que sobreviven al contenedor
- Docker Engine [reemplazado]: Recreá el contenedor: el viejo y su capa escribible se borran. Laboratorio Lección 05 · Datos que sobreviven al contenedor
docker compose up -d --wait --force-recreate app - Contenedor app: El contenedor nuevo monta el mismo volumen en /data. Laboratorio Lección 05 · Datos que sobreviven al contenedor
- Volumen signal-data [sobrevivió]: La marca sigue ahí. Qué lleva el punto: Archivo marca. Laboratorio Lección 05 · Datos que sobreviven al contenedor
docker compose exec -T app cat /data/marker - Volumen signal-data: docker compose down conserva los volúmenes con nombre; down -v los borra. Ni un volumen ni un bind mount son un respaldo. Modelo Lección 05 · Datos que sobreviven al contenedor
Fin del recorrido: La capa escribible muere con su contenedor; el volumen con nombre, no. Conservar datos no es respaldarlos.
E · Entrar al clúster
un contexto, dos nodos, una imagen cargada
- kubectl: Cada comando nombra el kubeconfig del curso y el contexto kind-prumathe-dk: el destino es explícito. Laboratorio Lección 13 · Conocé el clúster
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk get nodes - API server [2 nodos Ready]: El API server responde: un nodo de control y un worker, los dos contenedores Docker en tu computadora. Laboratorio Lección 13 · Conocé el clúster
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk wait --for=condition=Ready nodes --all --timeout=90s - kubelet: En cada nodo, un kubelet ejecuta los Pods que le asignan a través del runtime de contenedores del nodo. Laboratorio Lección 13 · Conocé el clúster
- containerd: El containerd del worker tiene su propio almacén de imágenes: tu imagen local todavía no está ahí. Laboratorio Lección 11 · Tags, digests y distribución
- Imagen: prumathe-signal:1.0.0 existe en tu Docker Engine. Qué lleva el punto: Imagen. Laboratorio Lección 11 · Tags, digests y distribución
- containerd [cargada]: kind load docker-image la copia al nodo. Con imagePullPolicy: Never, una importación faltante falla a la vista en lugar de descargar. Qué lleva el punto: Imagen. Laboratorio Lección 11 · Tags, digests y distribución
kind load docker-image prumathe-signal:1.0.0 --name prumathe-dk
Fin del recorrido: El clúster corre en contenedores en tu computadora: Kubernetes de verdad, un solo dominio de falla compartido. Sus nodos tienen su propio almacén de imágenes.
F · Declarar un Deployment
aplicar, guardar, reconciliar, ubicar, ejecutar
- kubectl: apply envía el estado deseado: un Deployment de dos réplicas y un Service. Qué lleva el punto: Estado deseado. Laboratorio Lección 15 · Estado deseado y observado
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab apply -f k8s/base.yaml - API server [aceptado]: El API server autentica, autoriza y valida el pedido, y lo acepta. Aceptado significa guardado, no en marcha. Qué lleva el punto: Estado deseado. Laboratorio Lección 15 · Estado deseado y observado
- etcd: Los objetos se guardan en etcd. Qué lleva el punto: Estado deseado. Modelo Lección 15 · Estado deseado y observado
- Deployment signal: El Deployment signal: una plantilla de Pod con la label app=signal y replicas: 2. Qué lleva el punto: Estado deseado. Laboratorio Lección 16 · Mantené réplicas en marcha
- Controladores [ReplicaSet]: El controlador de Deployments crea un ReplicaSet; el de ReplicaSets crea dos objetos Pod para llegar a la cantidad. Laboratorio Lección 16 · Mantené réplicas en marcha
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab get deployment,replicaset,pod -l app=signal - Scheduler [worker]: El scheduler encuentra Pods sin nodo y los asigna donde entran sus requests: 50m de CPU y 32Mi cada uno. Laboratorio Lección 21 · Requests, limits y ubicación
- kubelet: El kubelet del worker ve dos Pods asignados a su nodo. Laboratorio Lección 13 · Conocé el clúster
- containerd: containerd arranca sus contenedores desde la imagen cargada. Qué lleva el punto: Imagen. Laboratorio Lección 11 · Tags, digests y distribución
- Pods de signal [2/2 Ready]: Pasa el probe de arranque y después readiness: dos Pods Ready. Laboratorio Lección 15 · Estado deseado y observado
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab rollout status deployment/signal --timeout=90s
Fin del recorrido: Declaraste qué tiene que existir; el plano de control lo hizo realidad y lo sigue haciendo después de que termina kubectl. Aceptado, ubicado, en marcha y listo son cuatro momentos distintos.
G · Un pedido a través de un Service
un nombre estable, destinos listos, readiness
- Pods de signal: kubectl exec corre probe.py dentro de un Pod de signal: GET http://signal. Qué lleva el punto: Pedido HTTP. Laboratorio Lección 17 · Una entrada estable
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab exec deployment/signal -- python /app/probe.py http://signal 1.0.0 200 30 - Service signal: El nombre signal se resuelve a la IP virtual del Service, en el puerto 80. Qué lleva el punto: Pedido HTTP. Laboratorio Lección 17 · Una entrada estable
- Service signal [2 destinos]: Selecciona los Pods con la label app=signal; su EndpointSlice enumera sus direcciones y si cada uno está listo. Laboratorio Lección 17 · Una entrada estable
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab get endpointslices -l kubernetes.io/service-name=signal -o yaml - Pods de signal [200]: El pedido llega a un Pod listo en targetPort 8080. Qué lleva el punto: Pedido HTTP. Laboratorio Lección 17 · Una entrada estable
- kubelet [no listo]: En el Pod probe del laboratorio, /ready empieza a fallar. El kubelet marca el Pod como no listo y deja su contenedor corriendo. Laboratorio Lección 20 · Vivo, listo, arrancado
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab exec probe -- touch /tmp/not-ready - Service signal [sin tráfico]: El Pod no listo queda marcado así en el EndpointSlice: su Service deja de mandarle tráfico. Laboratorio Lección 20 · Vivo, listo, arrancado
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab get endpointslices -l kubernetes.io/service-name=probe-entry -o yaml - kubelet [listo]: Borrá el archivo y readiness vuelve a pasar. Un probe de liveness que fallara, sobre /health, reiniciaría el contenedor. Laboratorio Lección 20 · Vivo, listo, arrancado
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab exec probe -- rm /tmp/not-ready
Fin del recorrido: El Service les da a los clientes un nombre estable sobre Pods que van y vienen; readiness decide cuáles reciben tráfico, sin reiniciar nada.
H · Pods reemplazados, Pods pendientes
la cantidad se mantiene; la capacidad es real
- kubectl: Borrá los Pods de signal. Laboratorio Lección 16 · Mantené réplicas en marcha
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab delete pod -l app=signal --wait=true - API server: El API server registra el borrado. Laboratorio Lección 16 · Mantené réplicas en marcha
- kubelet [detenidos]: El kubelet detiene sus contenedores. Lo que escribieron en sus capas escribibles se pierde. Laboratorio Lección 16 · Mantené réplicas en marcha
- Controladores [0 de 2]: El ReplicaSet ve 0 de 2 y crea dos Pods nuevos: la cantidad deseada nunca cambió. Laboratorio Lección 16 · Mantené réplicas en marcha
- Scheduler: Los Pods nuevos se asignan al worker. Laboratorio Lección 21 · Requests, limits y ubicación
- Pods de signal [2/2, nombres nuevos]: Dos Pods otra vez, con nombres, UIDs e IPs nuevos. El Service los sigue encontrando por label. Laboratorio Lección 24 · Desplegá, rompé, recuperá
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab rollout status deployment/signal --timeout=90s - Scheduler [Pending]: Ahora un Pod que pide 1000 CPUs: no entra en ningún nodo, así que queda Pending y describe muestra FailedScheduling con el motivo. Laboratorio Lección 21 · Requests, limits y ubicación
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab describe pod no-room
Fin del recorrido: Los controladores mantienen la cantidad, no las instancias: los reemplazos son Pods nuevos. Y una cantidad deseada necesita capacidad real: lo que no entra en ningún lado espera Pending.
I · Desplegar y volver atrás
una plantilla nueva, un Pod por vez
- Docker Engine: Construí la versión 1.1.0. Qué lleva el punto: Imagen. Laboratorio Lección 22 · Cambiá versiones con una vuelta posible
docker build --build-arg APP_VERSION=1.1.0 -t prumathe-signal:1.1.0 app - Imagen: prumathe-signal:1.1.0 existe en tu Docker Engine. Qué lleva el punto: Imagen. Laboratorio Lección 22 · Cambiá versiones con una vuelta posible
- containerd [cargada]: Cargala en el nodo. Si te olvidás, los Pods nuevos no pueden arrancar. Qué lleva el punto: Imagen. Laboratorio Lección 22 · Cambiá versiones con una vuelta posible
kind load docker-image prumathe-signal:1.1.0 --name prumathe-dk - kubectl: set image cambia la plantilla de Pod del Deployment. Qué lleva el punto: Estado deseado. Laboratorio Lección 22 · Cambiá versiones con una vuelta posible
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab set image deployment/signal app=prumathe-signal:1.1.0 - Controladores [surge 1, unavailable 0]: Una plantilla nueva es un ReplicaSet nuevo, que crece de a un Pod: maxSurge 1, maxUnavailable 0. Laboratorio Lección 22 · Cambiá versiones con una vuelta posible
- Pods de signal [1.1.0]: Cada Pod nuevo tiene que estar listo antes de que se vaya uno viejo. El probe ahora ve 1.1.0. Laboratorio Lección 22 · Cambiá versiones con una vuelta posible
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab exec deployment/signal -- python /app/probe.py http://signal 1.1.0 200 30 - kubectl [vuelve a 1.0.0]: rollout undo restaura la plantilla anterior. No deshace una migración, datos externos ni un ConfigMap aparte. Laboratorio Lección 22 · Cambiá versiones con una vuelta posible
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab rollout undo deployment/signal
Fin del recorrido: Un rollout reemplaza Pods a través de un ReplicaSet nuevo, acá sin bajar nunca de la cantidad deseada. Volver atrás restaura una plantilla, no los datos ni la configuración de alrededor.
J · Configuración y secretos
se lee al arrancar, codificado y no cifrado
- kubectl: Aplicá un ConfigMap y un Secret. Qué lleva el punto: MESSAGE, Token falso. Laboratorio Lección 18 · Inyectá configuración de ejecución
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab apply -f k8s/config.yaml - ConfigMap, Secret: signal-settings guarda MESSAGE. demo-token guarda un token falso, codificado en base64, y no cifrado en etcd por defecto. Qué lleva el punto: MESSAGE, Token falso. Laboratorio Lección 18 · Inyectá configuración de ejecución
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab get secret demo-token - kubectl: set env --from agrega referencias a sus claves en la plantilla de Pod del Deployment. Qué lleva el punto: MESSAGE. Laboratorio Lección 18 · Inyectá configuración de ejecución
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab set env deployment/signal --from=configmap/signal-settings - Controladores [rollout]: Una plantilla cambiada implica un rollout. Laboratorio Lección 18 · Inyectá configuración de ejecución
- Pods de signal [hello-kubernetes]: Los Pods nuevos leen MESSAGE al arrancar. Qué lleva el punto: MESSAGE. Laboratorio Lección 18 · Inyectá configuración de ejecución
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab exec deployment/signal -- python /app/probe.py http://signal hello-kubernetes 200 30 - ConfigMap, Secret: Cambiar solo el ConfigMap no cambiaría ningún proceso en marcha: el entorno se lee al arrancar. Los archivos montados pueden actualizarse con el tiempo, si la aplicación los vuelve a leer. Modelo Lección 18 · Inyectá configuración de ejecución
Fin del recorrido: La configuración llega a un proceso cuando arranca, así que cambiarla implica un rollout. Un Secret tiene sus propios controles de acceso, pero base64 no es cifrado.
K · Almacenamiento más allá de un Pod
un pedido que sobrevive a su Pod
- kubectl: Aplicá un pedido y un Pod que lo usa. Qué lleva el punto: Estado deseado. Laboratorio Lección 19 · Almacenamiento más allá de un Pod
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab apply -f k8s/storage.yaml - PVC notebook [Bound]: El PVC notebook pide 64Mi, ReadWriteOnce. El provisionador local de kind crea un volumen y lo vincula. Laboratorio Lección 19 · Almacenamiento más allá de un Pod
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab get pvc notebook - Pod writer: El Pod writer monta el pedido en /data y escribe una marca. Qué lleva el punto: Archivo marca. Laboratorio Lección 19 · Almacenamiento más allá de un Pod
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab exec writer -- sh -c 'echo pvc-survived > /data/marker' - Pod writer [borrado]: Borrá solo el Pod. Nada recrea un Pod suelto. Laboratorio Lección 19 · Almacenamiento más allá de un Pod
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab delete pod writer --wait=true - PVC notebook [sigue Bound]: El pedido y su volumen siguen ahí. Qué lleva el punto: Archivo marca. Laboratorio Lección 19 · Almacenamiento más allá de un Pod
- Pod writer [sobrevivió]: Volvé a aplicar el manifiesto: un Pod writer nuevo con el mismo pedido lee la marca. Qué lleva el punto: Archivo marca. Laboratorio Lección 19 · Almacenamiento más allá de un Pod
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab exec writer -- cat /data/marker
Fin del recorrido: El pedido y su volumen sobreviven al Pod que escribió en ellos. Este almacenamiento vive en el entorno local de kind: no está replicado ni es un respaldo.
L · Quién puede hacer qué
un ServiceAccount, un Role, un RoleBinding
- kubectl: Aplicá el ServiceAccount observer, el Role pod-reader y un RoleBinding entre los dos. Laboratorio Lección 23 · Otorgá solo los verbos necesarios
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab apply -f k8s/rbac.yaml - API server: Preguntá como observer: el administrador lo suplanta con --as, que también requiere permiso. Qué lleva el punto: Identidad de quien llama. Laboratorio Lección 23 · Otorgá solo los verbos necesarios
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab auth can-i list pods --as=system:serviceaccount:dk-lab:observer - Autorizador RBAC [list pods: sí]: El RoleBinding observer-reads-pods le da a observer el Role pod-reader: get, list y watch sobre Pods en dk-lab. Qué lleva el punto: Identidad de quien llama. Laboratorio Lección 23 · Otorgá solo los verbos necesarios
- Autorizador RBAC [get secrets: no]: Nada otorga secretos, y RBAC no tiene reglas deny: lo que no se otorgó se rechaza. Qué lleva el punto: Identidad de quien llama. Laboratorio Lección 23 · Otorgá solo los verbos necesarios
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab auth can-i get secrets --as=system:serviceaccount:dk-lab:observer - API server [delete pods: no]: Borrar Pods también se rechaza. La autorización no dice nada de conectividad ni del login propio de la aplicación. Laboratorio Lección 23 · Otorgá solo los verbos necesarios
kubectl --kubeconfig kubeconfig --context kind-prumathe-dk -n dk-lab auth can-i delete pods --as=system:serviceaccount:dk-lab:observer
Fin del recorrido: observer puede leer Pods en dk-lab y nada más. Otorgá los verbos que necesita una carga; lo que nadie otorgó se rechaza.
Zonas
- Registro · Docker Hub
- Donde se guardan y se distribuyen las imágenes, acá Docker Hub. El build del curso arranca de una imagen base que se baja de ahí, fijada por su digest, así el build siempre arranca del mismo contenido. Qué no hace: El curso no publica nada ahí, y el clúster nunca baja Signal de ahí: la imagen llega al nodo de kind con kind load. Un tag es un nombre que se puede mover; solo el digest identifica el contenido. Lección 03 · Imágenes y capas, Lección 11 · Tags, digests y distribución
- Tu computadora · Docker Engine
- Donde corre todo: vos con docker, docker compose, kind y kubectl, el contexto de build, las imágenes que guarda Docker Engine, tu navegador y el proyecto Compose. El clúster kind también corre acá: sus nodos son contenedores en esta misma computadora. Qué no hace: Un contenedor no tiene su propio kernel: todos los contenedores de acá comparten el kernel de esta computadora. Nada de esto es un despliegue de producción, y el laboratorio nunca borra recursos de Docker que no son del curso. Lección 01 · Un proceso con límites, Lección 03 · Imágenes y capas, Lección 13 · Conocé el clúster
- Proyecto Compose prumathe-dk
- El sistema local que describe y levanta docker compose: los servicios app y toolbox en la red del proyecto, el volumen con nombre signal-data y el puerto publicado en el loopback de tu computadora. Compose les pone el nombre del proyecto como prefijo. Qué no hace: No es un orquestador: corre sobre un solo Docker Engine, en esta computadora. docker compose down borra los contenedores y la red pero conserva el volumen; down -v también lo borra. Lección 05 · Datos que sobreviven al contenedor, Lección 08 · Describí el sistema local
- Red prumathe-dk_default
- La red que Compose creó para el proyecto. Adentro, cada servicio se alcanza por su nombre: toolbox llega a app en app:8080. Tu navegador llega a app desde afuera, por el puerto publicado. Qué no hace: Los nombres se resuelven solo adentro: desde tu computadora, app no significa nada. Adentro de un contenedor, localhost es ese mismo contenedor. Lección 06 · Nombres en una red, Lección 07 · Publicá un puerto a propósito
- Clúster kind prumathe-dk · sus nodos son contenedores en tu computadora
- Un clúster de Kubernetes que kind corre como contenedores de Docker en tu computadora: un contenedor es el nodo del plano de control y otro es el nodo worker. kubectl llega a su API server con el kubeconfig del curso y el contexto kind-prumathe-dk. Qué no hace: Es un clúster para aprender, no de producción: un solo nodo de plano de control, almacenamiento local e imágenes cargadas a mano. Borrarlo borra todo lo que se declaró en él, incluidos los datos del PVC. Lección 13 · Conocé el clúster, Lección 15 · Estado deseado y observado
- Plano de control · nodo prumathe-dk-control-plane
- La parte del clúster que guarda y reconcilia el estado deseado: el API server, la única puerta; etcd, donde se guarda cada objeto; el scheduler, que asigna los Pods a nodos; los controladores, que cierran la distancia entre lo deseado y lo observado; y RBAC, que decide quién puede hacer qué. Qué no hace: No corre tus contenedores: eso lo hace el kubelet de cada nodo. Un objeto que acepta queda guardado, todavía no listo. Lección 13 · Conocé el clúster, Lección 15 · Estado deseado y observado, Lección 23 · Otorgá solo los verbos necesarios
- objetos de dk-lab
- Los objetos declarados en el namespace dk-lab: el Deployment signal y sus ReplicaSets, el Service signal, el ConfigMap y el Secret, y el PVC notebook. Cada uno registra estado deseado en el API server. Qué no hace: Un objeto no ejecuta nada por sí solo: actúan sobre él los controladores y los kubelets. Borrar el namespace los borra a todos. Lección 15 · Estado deseado y observado, Lección 16 · Mantené réplicas en marcha, Lección 17 · Una entrada estable
- Nodo worker
- El nodo donde corren los Pods del curso: su kubelet los arranca a través de containerd y ejecuta sus probes, y containerd guarda las imágenes propias del nodo, donde kind load pone prumathe-signal. Qué no hace: No decide dónde van los Pods ni cuántos hay: eso lo deciden el scheduler y los controladores. Un Pod reemplazado acá es un Pod nuevo, con otro nombre y otra IP. Lección 14 · El límite del Pod, Lección 20 · Vivo, listo, arrancado, Lección 21 · Requests, limits y ubicación
Piezas
- Imagen base · python:3.14.8-alpine3.24, por digest
- La imagen de la que parte el Dockerfile con FROM, guardada en un registro y fijada por su digest, para que el build siempre empiece del mismo contenido. Qué no hace: Un tag solo es un nombre que se puede mover; lo que identifica el contenido es el digest. El curso no publica nada en un registro. Lección 11 · Tags, digests y distribución, Lección 04 · Construí una imagen
- Vos · docker, compose, kind
- Donde empieza cada comando: docker construye y ejecuta, docker compose describe el sistema local, kind crea el clúster. Qué no hace: El laboratorio nunca te pide purgar recursos de Docker que no sean del curso. Lección 00 · Antes de empezar, Lección 08 · Describí el sistema local
- Contexto de build · labs/app
- La carpeta que se envía al build: Dockerfile, server.py y probe.py. COPY solo puede leer de ahí; .dockerignore deja afuera lo demás. Qué no hace: Un secreto puesto acá o pasado como argumento de build termina dentro de la imagen. Lección 04 · Construí una imagen
- Docker Engine · construye imágenes, ejecuta contenedores
- El demonio detrás de cada comando docker: construye imágenes, las guarda y crea, arranca y detiene contenedores. Compose también le habla. Qué no hace: A un contenedor unhealthy no lo reinicia por estar unhealthy; las políticas de reinicio tratan de que el proceso termine. Lección 01 · Un proceso con límites, Lección 02 · Arrancar, parar, borrar, Lección 10 · Salud y límites de recursos
- kubectl · contexto kind-prumathe-dk
- El cliente que envía pedidos al API server. Cada comando del curso nombra el kubeconfig del curso y el contexto kind-prumathe-dk. Qué no hace: kubectl no ejecuta nada en los nodos; cuando termina, el plano de control sigue reconciliando. Lección 13 · Conocé el clúster, Lección 15 · Estado deseado y observado
- Imagen · prumathe-signal, 1.0.0
- Capas de sistema de archivos más configuración: USER 10001, CMD y APP_VERSION. Es el artefacto, no un proceso en marcha. Qué no hace: Lo que escribe un contenedor nunca la cambia, y una imagen de tu Docker no está en un nodo de Kubernetes hasta que se carga ahí. Lección 03 · Imágenes y capas, Lección 11 · Tags, digests y distribución
- toolbox · probe.py, un cliente
- Un segundo contenedor de la misma imagen que corre probe.py contra app: revisa por separado la resolución del nombre, la conexión, el estado y el texto. Qué no hace: Adentro, localhost es el propio toolbox, no app ni tu computadora. Lección 06 · Nombres en una red, Lección 12 · Seguí la evidencia
- Contenedor app · server.py, UID 10001
- Signal en marcha: un proceso con una vista aislada de procesos, red y archivos, su propia capa escribible, 0,5 CPU y 128 MiB, y un health check sobre /health. Qué no hace: Comparte el kernel de tu computadora, y correr como UID 10001 reduce privilegios sin volver inofensivo un código no confiable. Lección 01 · Un proceso con límites, Lección 02 · Arrancar, parar, borrar, Lección 08 · Describí el sistema local, Lección 10 · Salud y límites de recursos
- Volumen signal-data · montado en /data
- Un volumen con nombre que administra Docker y Compose monta en /data. Sobrevive al contenedor que escribió en él. Qué no hace: No es un respaldo, y docker compose down -v lo borra. Lección 05 · Datos que sobreviven al contenedor
- Tu navegador · 127.0.0.1:18080
- Un cliente afuera de todo contenedor. Llega a Signal por el puerto que Compose publicó en el loopback de tu computadora. Qué no hace: El nombre app no significa nada acá: solo se resuelve dentro de la red del proyecto. Lección 07 · Publicá un puerto a propósito
- etcd · el estado guardado
- El almacenamiento clave-valor detrás del API server: cada objeto, deseado y observado, vive acá. Qué no hace: Nadie le habla salvo el API server. Los Secrets no están cifrados en él por defecto. Lección 15 · Estado deseado y observado, Lección 18 · Inyectá configuración de ejecución
- Scheduler · elige un nodo
- Busca Pods sin nodo y asigna cada uno a un nodo donde entren sus requests, junto con restricciones como los taints. Qué no hace: No arranca contenedores, y el uso real no borra los requests declarados: un Pod que no entra en ningún lado queda Pending. Lección 21 · Requests, limits y ubicación
- Controladores · achican la diferencia
- Bucles que comparan el estado deseado con el observado y actúan para reducir la diferencia: el controlador de Deployments maneja ReplicaSets, el de ReplicaSets mantiene la cantidad de Pods. Qué no hace: Un Pod suelto no tiene controlador: si lo borrás, nada lo trae de vuelta. Lección 15 · Estado deseado y observado, Lección 16 · Mantené réplicas en marcha, Lección 14 · El límite del Pod
- Autorizador RBAC · Roles y RoleBindings
- Cómo decide el API server si alguien puede aplicar un verbo sobre un recurso: un Role enumera permisos, un RoleBinding se los da a un sujeto. Qué no hace: Los permisos RBAC solo se suman; no hay reglas deny. No dice nada de conectividad de red ni de login de la aplicación. Lección 23 · Otorgá solo los verbos necesarios
- API server · todo pedido pasa por acá
- La puerta del clúster. Autentica y autoriza cada pedido, valida objetos, los guarda en etcd, y es lo que miran los controladores, el scheduler y los kubelets. Qué no hace: Aceptar un objeto significa que se guardó, no que sus Pods estén listos. Lección 13 · Conocé el clúster, Lección 15 · Estado deseado y observado
- Deployment signal · 2 réplicas, ReplicaSets
- Una plantilla de Pod y una cantidad deseada. Cada cambio de plantilla crea un ReplicaSet nuevo; un rolling update pasa los Pods del viejo al nuevo. Qué no hace: rollout undo restaura una plantilla, no una base de datos, datos externos ni un ConfigMap aparte. Lección 16 · Mantené réplicas en marcha, Lección 22 · Cambiá versiones con una vuelta posible
- Service signal · puerto 80 a 8080
- Un nombre y una IP virtual estables que seleccionan Pods por la label app=signal. Sus EndpointSlices enumeran los destinos listos. Qué no hace: Tipo ClusterIP: accesible solo dentro del clúster. Una respuesta DNS no prueba que la aplicación esté sana. Lección 17 · Una entrada estable
- ConfigMap, Secret · signal-settings, demo-token
- El ConfigMap signal-settings guarda MESSAGE; el Secret demo-token guarda un token claramente falso. Los Pods los pueden leer como variables de entorno o archivos. Qué no hace: base64 es codificación, no cifrado. Cambiar un ConfigMap no cambia el entorno de un proceso que ya está corriendo. Lección 18 · Inyectá configuración de ejecución, Lección 09 · Configuración y secretos
- PVC notebook · 64Mi, ReadWriteOnce
- Un pedido de almacenamiento. El provisionador local de kind crea un PersistentVolume para él; el pedido sobrevive a los Pods que lo montan. Qué no hace: ReadWriteOnce significa un nodo, no un Pod. Este almacenamiento es local a kind: borrar el clúster lo pierde. Lección 19 · Almacenamiento más allá de un Pod
- kubelet · ejecuta y prueba Pods
- El agente de cada nodo: ejecuta los Pods asignados a su nodo a través del runtime de contenedores, y corre sus probes de arranque, readiness y liveness. Qué no hace: Readiness solo controla el tráfico; liveness reinicia el contenedor. Ninguno reemplaza un Pod borrado: eso es trabajo de un controlador. Lección 20 · Vivo, listo, arrancado, Lección 13 · Conocé el clúster
- containerd · imágenes del nodo
- El runtime de contenedores del nodo, con su propio almacén de imágenes. kind load docker-image copia ahí tu imagen local. Qué no hace: Con imagePullPolicy: Never nunca descarga: una imagen faltante falla con ErrImageNeverPull. Lección 11 · Tags, digests y distribución, Lección 22 · Cambiá versiones con una vuelta posible
- Pods de signal · 2 réplicas, cada una con su nombre y su IP
- Las réplicas en marcha: cada Pod tiene un contenedor de prumathe-signal, un nombre, un UID y una IP propios, requests de 50m de CPU y 32Mi, y tres probes. Qué no hace: La identidad de un Pod es temporal: un reemplazo es un Pod nuevo con otro nombre, y los archivos que escribió no pasan. Lección 14 · El límite del Pod, Lección 16 · Mantené réplicas en marcha, Lección 21 · Requests, limits y ubicación
- Pod writer · notebook en /data
- Un Pod suelto que monta el pedido notebook en /data y escribe ahí una marca. Qué no hace: Como está suelto, nada lo recrea cuando se borra; volver a aplicar el manifiesto, sí. Lección 19 · Almacenamiento más allá de un Pod
Qué viaja
- I · Imagen
- prumathe-signal: capas y configuración, identificadas por un ID de imagen. De dónde viene: docker build, desde el contexto de build. Dónde termina: Tu Docker Engine, y el containerd de un nodo después de kind load.
- G · Digest base
- El digest sha256 que fija el contenido de la imagen base. De dónde viene: El registro. Dónde termina: El FROM del Dockerfile, y la imagen construida sobre ella.
- R · Pedido HTTP
- Un GET a Signal, que responde con su mensaje y su versión. De dónde viene: Tu navegador, toolbox, o probe.py dentro de un Pod. Dónde termina: Un proceso que escucha en el puerto 8080.
- K · Archivo marca
- Un archivo chico escrito en /data para probar qué sobrevive a un reemplazo. De dónde viene: Un contenedor o un Pod. Dónde termina: Un volumen con nombre, o el volumen detrás de un pedido.
- M · Estado deseado
- Objetos descritos en un manifiesto: kind, metadatos y spec. De dónde viene: kubectl apply, o un comando imperativo. Dónde termina: etcd, a través del API server; los controladores actúan sobre él.
- E · MESSAGE
- Un valor de ejecución que el proceso lee al arrancar. De dónde viene: Una variable de entorno: Compose, docker run -e, o un ConfigMap. Dónde termina: El entorno de un proceso nuevo.
- S · Token falso
- Una credencial deliberadamente falsa, para mostrar adónde van los secretos y qué los protege. De dónde viene: demo-token.txt en Compose; el Secret demo-token en Kubernetes. Dónde termina: Un archivo montado, o el objeto Secret detrás de la API.
- A · Identidad de quien llama
- De quién viene un pedido: acá, el ServiceAccount observer. De dónde viene: kubectl, suplantando con --as. Dónde termina: El API server, que la autentica y le pregunta a RBAC.