Kubernetes Simulator

intermediate · ~10 min

Config, not code

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.

Objectives

Best on a computer with a keyboard. It works on a phone, with shortcuts under the terminal.