REST API, mission 1 of 7

Config, not code

intermediate, about 10 minutes, in the Kubernetes Simulator

Start mission

Free in your browser, nothing to install.

The briefing

orders-api is the service behind the shop's checkout. It reads two settings from its environment: LOG_LEVEL, and DB_PASSWORD for its database (the password is s3cret-v1).

Settings belong in a ConfigMap and credentials in a Secret, never baked into the image or typed into the Deployment — so the same image runs in every environment and the password lives in one guarded place.

orders.yaml is waiting in your directory (cat orders.yaml). Make the ConfigMap and the Secret, wire them into the container's env with valueFrom, and apply it.

What you'll do

  • Create a ConfigMap orders-config with LOG_LEVEL=info
  • Create a Secret orders-db holding the password s3cret-v1
  • Run 2 ready orders pods that take LOG_LEVEL and DB_PASSWORD from them
  • Bonus star: Check what reached the container with kubectl set env deployment/orders --list

The mission checks the cluster, not your keystrokes: any fix that works, passes.

More REST API missions

  1. 1. Config, not code
  2. 2. Read at start
  3. 3. CrashLoopBackOff
  4. 4. Ready when it's ready
  5. 5. Out of memory
  6. 6. Launch-day traffic
  7. 7. Rotate the password
Every Kubernetes Simulator mission

AboutGuidesCompare

PrivacyCookiesTerms

Hackademy is a trading name of Mather Software Ltd, registered in England and Wales, company number 17443861. ICO registration ZC256628.

Contact: support@mathersoftware.com© 2026 Mather Software Ltd