A hands-on workshop repository for learning core Kubernetes concepts. It includes a purpose-built demo application
(podinfo) and a full set of Kubernetes manifests covering the most common resource types.
kubernetes-workshop/
├── podinfo/ # The demo application (Node.js) and its own Dockerfile
├── workshop/ # (Workshop content)
└── WORKSHOP-SETUP.md # Environment setup guide (minikube)
podinfo is a tiny, dependency-free Node.js application designed specifically for demonstrating how Kubernetes works.
It exposes an HTML dashboard and a JSON API showing:
- Pod identity — pod name, IP, UID, namespace, node name, service account (injected via the Kubernetes Downward API)
- Request info — client socket address,
X-Forwarded-Forheader, all request headers - Runtime info — uptime, Node.js version, CPU/memory usage
- All environment variables — great for demonstrating ConfigMaps and Secrets
- Per-instance color and ID — changes with every pod restart, making load balancing across replicas immediately visible in the browser
| Endpoint | Description |
|---|---|
/ |
HTML dashboard with all pod/request info |
/api |
Same data as JSON (useful for curl/scripts) |
/health |
Liveness probe — returns ok |
/ready |
Readiness probe — returns ready |
/logs |
Contents of this instance's request log file |
cd podinfo
node server.js
# Open http://localhost:8080cd podinfo
docker build \
--build-arg BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ) \
--build-arg VCS_REF=$(git rev-parse --short HEAD) \
--build-arg VERSION=1.0.0 \
-t netgrif/podinfo:1.0.0 .
docker run -p 8080:8080 netgrif/podinfo:1.0.0The pre-built image is available on Docker Hub as netgrif/podinfo:latest.
See WORKSHOP-SETUP.md for full setup instructions including minikube installation and addon configuration (Ingress, Dashboard, Metrics Server).
minikube start
minikube addons enable dashboard
minikube addons enable metrics-serverFor local Ingress DNS resolution (so podinfo.local resolves on your machine):
minikube addons enable ingress-dns- Load balancing — Scale replicas and refresh the page; watch the pod color and instance ID change with each request.
- Downward API — Observe that
POD_NAME,POD_IP, etc. are injected by Kubernetes, not guessed by the app. - ConfigMaps & Secrets — Mount them as env vars and see them appear in the dashboard.
- Rolling updates — Change the image, run
kubectl set image, and watch pods roll one at a time. - Self-healing — Delete a pod (
kubectl delete pod <name>) and watch Kubernetes recreate it. - Readiness vs. liveness probes — Break
/readyand observe that the pod is removed from Service endpoints but not restarted. - PersistentVolumeClaims — Delete a pod and show that the log file survives on the PVC.
- StatefulSets — Use the headless service to reach individual pods by stable DNS name.
- Graceful shutdown — The app handles
SIGTERM, useful for discussing pod termination grace periods.