Skip to content

Labs

One playbook per phase. Every YAML file is complete and copy-pasteable, every step shows the expected output, and every lab ends with a verify block. Where the syllabus asks you to write something by hand, the solution is in a collapsible block - try first, then peek.

Ground rules

  1. Type the kubectl commands yourself. Copy-paste YAML, but type commands - that's where muscle memory comes from.
  2. Read every error. When output doesn't match the expected output shown, stop and figure out why before continuing. That debugging is the actual learning.
  3. Do the labs in order. Lab 4 assumes the cluster from Lab 1, Lab 6 reuses manifests from Lab 2.

The demo stack

All labs use the same small set of public, multi-arch images (they work on Apple Silicon):

ImageRole in the labs
traefik/whoamiThe main app. Tiny HTTP server that echoes its hostname - perfect for seeing load balancing and rolling updates. Tags v1.10 and v1.11 give us real version upgrades.
postgres:16-alpineThe stateful workload for config, secrets, and persistent volumes.
adminerA web UI for Postgres - our "app that depends on a database" for probe exercises.
nginxStatic frontend for the ingress lab.
curlimages/curlIn-cluster test client.
busybox:1.36CronJob payloads.
polinux/stressDeliberately eats memory so we can trigger OOMKilled on purpose.

Prerequisites

bash
brew install kind kubectl k9s helm
docker --version   # any recent version, must be running

Workspace

Keep lab files in a directory per lab:

bash
mkdir -p ~/project/k8dev-labs/{lab-1,lab-2,lab-3,lab-4,lab-5,lab-6}
cd ~/project/k8dev-labs

The labs

LabPairs withWhat you build
Lab 1Phase 1An ingress-ready kind cluster + kubectl drills
Lab 2Phase 2whoami: Deployment, Service, rolling update, rollback
Lab 3Phase 3Postgres + Adminer with ConfigMap, Secret, PVC, probes
Lab 4Phase 4Two services behind one Ingress on a real hostname
Lab 5Phase 5Break-and-fix drills, CronJob, autoscaling
Lab 6Phase 6Helm install of podinfo + Kustomize dev/prod overlays

A VineLab lab. Released under the MIT License.