Kubernetes Visual Handbook · interactive lab / POC

You declare it.
Who keeps it running?

Two replicas are ready. Change one number in the manifest: more Pods appear, node reservations grow, and eventually a Pod has nowhere to go. Delete a Pod and watch its owner replace it. Then try the same thing without an owner.

The tree shows resource ownership; the badges show node assignments. Every status, counter and event below comes from one state model.

Pod lifecycleLOCAL SANDBOX / DEFAULT NAMESPACE
● HealthyManifest applied
t = 3s
pod-lifecycle.yamlDESIRED

Edit replicas, requests, limits or image. Changes take effect after Apply.

Ready / desired2 / 2
Pending0
CPU available3000 m
Memory available3584 Mi
Resource tree
D
Deploymentcheckout2 desired · Recreate
RS
ReplicaSetcheckout-r1current revision

─ ownershipNode badge = scheduling assignmentClick a Pod to inspect it

▣ worker-01ALLOCATABLE
CPU1000 / 2000 m free

1000 m reserved by requests

Memory1536 / 2048 Mi free

512 Mi reserved by requests

▣ worker-02ALLOCATABLE
CPU2000 / 2000 m free

0 m reserved by requests

Memory2048 / 2048 Mi free

0 Mi reserved by requests

Two replicas are ready. Change the manifest, then apply it.

Pod detailspod-1

checkout-r1-001

API phase
Running
Display status
Running
Node
worker-01
Container restarts
0
Last termination
None
Requests
500m / 256Mi
Limits
1000m / 512Mi

Its ReplicaSet replaces a deleted Pod with a new UID. A container restart keeps the existing UID.

EventsFROM THE MODEL
Startedcheckout-r1-002

Container is running. This experiment uses a fixed two-step startup before Ready.

Startedcheckout-r1-001

Container is running. This experiment uses a fixed two-step startup before Ready.

Scheduledcheckout-r1-002

Bound to worker-01 using requests, not limits or observed usage.

Scheduledcheckout-r1-001

Bound to worker-01 using requests, not limits or observed usage.

Createdcheckout-r1-002

ReplicaSet creates a Pod to match the desired replica count.

Createdcheckout-r1-001

ReplicaSet creates a Pod to match the desired replica count.

Appliedcheckout

Desired state accepted. Reconciliation happens on the next step.

Synthetic workload per running container

CPU under the limit. Requests reserve capacity; limits constrain runtime.

Replay the experiment

Each clock tick advances one simulated second. History also includes edits. Rewind preserves UIDs, events and applied manifests. The timings are didactic.

Local simulation · no cluster connected. Two fixed 2-CPU / 2-Gi nodes; first-fit placement. Image catalog: nginx:1.27, nginx:1.28. Recreate strategy, one container per Pod. No HPA, node autoscaling, probes, networking or node-pressure eviction.

Break it, one field at a time

  1. Change replicas: 2 to 6, then Apply and Run. The Deployment's ReplicaSet creates the missing Pods. Each node fits four requests of 500m; placement consumes requests, not CPU limits.
  2. Request 3000m of CPU and set its limit to 4000m. Neither 2000m node fits one Pod. Both nodes together have 4000m free, but a Pod cannot straddle them.
  3. Choose “Memory limit exceeded”. The synthetic process needs 192 Mi, above its 128Mi limit. The container is OOM-killed and restarted with backoff. Its Pod UID and reservation stay. Lower the working set to 96 Mi to let it recover.
  4. Delete a selected Pod. A Deployment replaces it with a new UID. Load “A Pod without a controller” and repeat: no replacement appears. Reapplying the manifest after deletion creates the standalone Pod again.
  5. Try “Image pull fails”. Scheduling succeeds and requests are reserved, yet the Pod remains Pending. ImagePullBackOff is a waiting reason, not a Pod phase.
  6. Scale to zero. Pods enter Terminating. Their reservations are released after the declared grace period, not when you click Apply.

Three jobs, three different identities

The controller maintains a replica count; the scheduler binds a new Pod to a node; the kubelet manages containers on that node. Restarting a container keeps the Pod UID. Replacing a Pod gives it a new UID. A Pod is scheduled once, rather than moved between nodes. Pod lifetime →

requests determine scheduling reservations. CPU limits can throttle; memory limits can lead to an OOM kill. Neither automatically changes the replica count. Resource management →

The boundary of this experiment

This POC uses two fixed nodes, first-fit placement and a synthetic working set. Startup takes two simulated steps; restart backoff is deliberately shortened. It supports one container, explicit CPU/memory requests and the Deployment's Recreate strategy. Unknown manifest fields are rejected so that an unsupported setting cannot appear to work.

It does not implement the Kubernetes scheduler, API server or Linux cgroups. It omits HPA, node autoscaling, probes, sidecars, affinity, storage, networking, quotas and node-pressure eviction. The gauges show unreserved allocatable capacity, not live cluster usage or a sizing recommendation. The simulated image catalog is explicit.

Run the counterpart

Manifest files and commands → Apply them to a disposable cluster with kubectl. Observe scheduling, deletion/replacement and image-pull failure against the real API. Real scheduling and timing depend on that cluster; the synthetic load is not a measurement of nginx.

Download Deployment → · Download standalone Pod →

Read: a Pod is not its container →

A container is OOM-killed and restarted. Does the Pod get a new UID?

Commit to an answer first. You cannot change it afterwards.

END-OF-LAB CHECKPOINT · BANK 0.1.0

Check your Pod lifecycle reasoning

Three questions after the experiment. Apply the mechanisms you observed; this is a practice checkpoint.

3 questions · 7 points · target 70%

Practice bank · educator review pending for 3 questions.

QUESTION 1 · single-choice1 point

A container is OOM-killed and restarted inside a Pod. What happens to the Pod UID?

Choose one answer.

A container is OOM-killed and restarted inside a Pod. What happens to the Pod UID?
QUESTION 2 · matching3 points

Match each responsibility to the component that performs it. Targets may be used more than once.

Drag a responsibility to a target, or choose its target in the list. Targets can be reused. Each correct match earns a share of the points.

Kubelet
    ReplicaSet controller
      Scheduler
        QUESTION 3 · code-analysis3 points

        Each of the two lab nodes has 2000m allocatable CPU and no reservations. What happens to a Pod using this container resource fragment?

        Choose one answer.

        resources:
          requests:
            cpu: 3000m
            memory: 256Mi
          limits:
            cpu: 4000m
            memory: 512Mi
        Each of the two lab nodes has 2000m allocatable CPU and no reservations. What happens to a Pod using this container resource fragment?

        0 / 3 questions completed. Missing responses earn zero; partial matching follows the stated scoring rule.

        Answers stay editable until submission. Explanations appear afterwards.

        Continue to the handbook assessment →