Inject a ConfigMap and a Secret as Env Vars
The mailer Deployment in the analytics namespace still has its settings baked into the image. The team wants them moved into the cluster: plain settings in a ConfigMap, the database password in a Secret, both delivered to the containers as environment variables.
mailer-settings in analytics with exactly these keys: APP_MODE=staging, LOG_LEVEL=debug, REGION=us-east.mailer-db in analytics with the key password set to meadow.mailer receives every key of mailer-settings as an environment variable of the same name.password key as the environment variable DATABASE_PASSWORD.2 replicas of mailer are available with the new configuration.mailer-legacy as it is.A practice cluster is running on this machine: start with kubectl get deploy,configmap,secret -n analytics.
About this machine
Ubuntu 24.04 with a private practice cluster: a real Kubernetes API server, scheduler and controllers, and three nodes (controlplane, node01, node02). Containers are simulated, so images never download and kubectl logs/exec are not available. k is an alias for kubectl, with completion. The grader checks the cluster's final state, not the commands you typed.
Your machine is ready to start
Create a free account to open a machine and get graded.