Kubernetes Simulator

advanced · ~15 min

No shell

Ticket from Dana Kowalski, on-call lead

Platform is moving the payments database this morning. If payments stops being ready, the logs won't help much — they only say upstream database unavailable.

And the image is distroless: there's no shell to kubectl exec into. kubectl debug adds a temporary container with tools to a running pod, sharing its network. Find out what payments can't reach, and fix it.

kubectl debug

Adds an ephemeral container to a running pod: same network, and with --target the same process view, but your choice of image — busybox has nslookup and wget. Without -it, it runs one command; kubectl logs POD -c reads its output. It can't be removed, and it never changes the app's container. Docs

Objectives

  • payments: 2 ready replicas
  • payments reaches its database by a name that resolves
  • Bonus: Look from inside with kubectl debug before changing anything

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