Interview Prep/Kubernetes/Upgrades, etcd, disaster recovery and incidents

How do you debug a pod that has no shell in its image?

IntermediateScenarioUpgrades, etcd, disaster recovery and incidents
Answer

Situation read → Distroless images.

What I'd do →

  1. kubectl debug -it pod/app --image=busybox --target=app
  2. Use --copy-to to clone the pod with a debug image
  3. Inspect shared process namespace
  4. Check network from the same netns
  5. Remove debug pods

Why → Ephemeral containers attach tooling without rebuilding the image.

Interview tip → Say you do not bake debug tools into prod images.

All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Upgrades, etcd, disaster recovery and incidents