Kubernetes Simulator

intermediate · ~10 min

Read at start

orders is logging too little to debug a customer's failed checkout. Its log level comes from the LOG_LEVEL key of the orders-config ConfigMap.

kubectl edit configmap orders-config opens the live object in your editor and saves it back when you do. But a container reads its environment once, when it starts: kubectl exec POD -- printenv LOG_LEVEL shows what a running pod really has. kubectl rollout restart replaces the pods, gradually, so the new ones read the new value.

Objectives

  • Set LOG_LEVEL to debug in orders-config
  • Both orders pods running with LOG_LEVEL=debug
  • Bonus: Prove it from inside: printenv LOG_LEVEL in a pod

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