World map

 

BM: Baca dalam Bahasa Melayu

World K4: Notes, Lockers & Packages · Boss challenge

Same app, three kitchens

You will learn: to run one app in dev, staging and prod, each with its own settings and trays.

Checked with Kubernetes 1.37 on 31 Oct 2026

The problem

You are here: cluster kind-dev namespace default
ls overlays shows dev, prod and staging. The staging kustomization puts everything in namespace staging, with 2 replicas and a settings patch. Terminal output: $ ls overlays dev prod staging $ cat overlays/staging/kustomization.yaml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namespace: staging resources: - ../../base - namespace.yaml replicas: - name: shop count: 2 patches: - path: settings-patch.yaml

Boss: one shop, three kitchens. Dev: 1 tray, debug logs. Staging: 2 trays, info. Prod: 3 trays, warn. One base, three sticky notes. Open them all.

Try it

Kitchen 1: dev. Preview it, then open it.

You are here: cluster kind-dev namespace default
Stalls: 3. Trays: 0 (0 ready). Waiting for a stall: 0.
dev-control-planeOpenManager

No trays here.

dev-workerOpen

No trays here.

dev-worker2Open

No trays here.

Time: +0s (sped up)

Try it

Kitchen 2 has a problem. A teammate added a cache switch to staging’s note. The API server refuses it. Fix the note.

Fix the manifest, then press Apply.

settings-patch.yaml8 lines

Try it

Your fix is in the files now. Open staging, then prod.

You are here: cluster kind-dev namespace default
Stalls: 3. Trays: 0 (0 ready). Waiting for a stall: 0.
dev-control-planeOpenManager

No trays here.

dev-workerOpen

No trays here.

dev-worker2Open

No trays here.

Time: +0s (sped up)

Check

The base says LOG_LEVEL: debug. Staging’s note says info. What does a staging tray print for printenv LOG_LEVEL?

Pick one answer.

Check

You are here: cluster kind-dev namespace default
get deployments across all namespaces shows shop in dev 1/1, prod 3/3 and staging 2/2. The staging tray prints true for CACHE. Terminal output: $ kubectl get deployments -A -l app=shop NAMESPACE NAME READY UP-TO-DATE AVAILABLE AGE dev shop 1/1 1 1 17s prod shop 3/3 3 3 17s staging shop 2/2 2 2 17s $ kubectl exec -n staging deploy/shop -- printenv CACHE true

Three zones, three orders: 1, 2 and 3 trays. Staging read your fixed note: true.

Try it

Before any work on prod, make prod your “you are here” zone. Then list its trays.

You are here: cluster kind-dev namespace default
Stalls: 3. Trays: 0 (0 ready). Waiting for a stall: 0.
dev-control-planeOpenManager

No trays here.

dev-workerOpen

No trays here.

dev-worker2Open

No trays here.

Time: +0s (sped up)

Check

Safe move or risky? Swipe each one.

Swipe right for good, left for needs work. Or use the buttons.

1 / 4

Preview with kubectl kustomize before apply -k.

Preview with kubectl kustomize before apply -k.

You did it!

You can now run one app in three kitchens, each its own way.

Go deeper (optional)

Real teams keep these folders in Git. A change to overlays/prod goes through a pull request. In World K7, a GitOps tool applies it for you.

Real rep (optional), on a practice kind cluster:

Real mission

  1. kubectl apply -k overlays/dev
  2. kubectl apply -k overlays/staging
  3. kubectl apply -k overlays/prod
  4. kubectl get deployments -A -l app=shop
  5. kubectl delete -k overlays/prod

0 of 6 steps done · Your ticks are saved.