About this scenario
The app has a base and two overlays. Staging is deployed and fine. The prod overlay has never worked.
Prod should run 3 replicas of ghcr.io/k8wiz/hello:1.1 in the prod namespace, with a 256Mi memory limit and its own greeting.
kubectl kustomize overlays/prod builds it without touching the cluster. Edit the files in the editor (or with cat > file), then kubectl apply -k overlays/prod.
Objectives
- Build the prod overlay without errors
- prod runs 3 replicas of hello 1.1
- prod-web has a 256Mi memory limit
- prod greets with its own message
- staging is unchanged
What you'll practice
- Overlays change a base without copying it:
namespace, namePrefix, images, replicas and patches are applied on top. - Patches and
replicas target names as the base defines them. The prefix and the generators' hash suffix are added afterwards, and references to renamed objects are updated for you. - A generated ConfigMap's name ends in a hash of its content, so changing the content renames it and rolls the Pods that use it.
- An
images rule that doesn't match fails silently. Always read the built output (kubectl kustomize or kubectl diff -k) before applying.
How the playground works
The cluster runs entirely in your browser: a simulated API server, scheduler, kubelets and controllers, with virtual nodes in three zones. kubectl output follows the real formats, errors use the real messages, and the add-ons (CSI storage, Traefik, Envoy Gateway, cert-manager, Flux, Argo CD) behave like their real counterparts for the common paths. It's a simulation, so some behavior is simplified. Your progress is saved in this browser.