8-Session Lab Guide for Intermediate Developers
Cluster: this repo is configured for kind (
kind create cluster --name k8s-labs). All commands, port mappings, and image-load instructions use kind defaults.
Every session adds a new Kubernetes concept to one evolving real application: a full-stack Incident Tracking system.
| Layer | Technology | Image |
|---|---|---|
| Backend API | Node.js + Express | incident-api:v1 / v2 |
| Frontend UI | React + Vite (served by nginx) | incident-frontend:v1 |
| Database | PostgreSQL 15 | postgres:15-alpine (public) |
API endpoints:
| Method | Path | Description |
|---|---|---|
GET |
/health |
Version + storage mode |
GET |
/incidents |
List all incidents |
POST |
/incidents |
Create { title, severity } |
Storage auto-detection: when POSTGRES_PASSWORD is set the backend switches to PostgreSQL automatically; otherwise it runs with an in-memory array. Same image, no rebuild needed between sessions.
Run this once before Session 1 (or after recreating your cluster).
# 1. Create the kind cluster
kind create cluster --name k8s-labs
kubectl cluster-info --context kind-k8s-labs
# 2. Build images and load them into the cluster
chmod +x app/build.sh
./app/build.sh kind
# 3. Verify the images are available
docker exec kind-k8s-labs-control-plane crictl images | grep incidentImages produced and loaded:
| Image | First used in |
|---|---|
incident-api:v1 |
Session 1 |