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 →
kubectl debug -it pod/app --image=busybox --target=app- Use
--copy-toto clone the pod with a debug image - Inspect shared process namespace
- Check network from the same netns
- Remove debug pods
Why → Ephemeral containers attach tooling without rebuilding the image.
Interview tip → Say you do not bake debug tools into prod images.
More on Upgrades, etcd, disaster recovery and incidents
How do you back up etcd on a self-managed cluster?BeginnerHow do you restore a cluster from an etcd snapshot?Advancedetcd database space exceeded: `mvcc: database space exceeded`. What now?AdvancedWalk through a kubeadm minor version upgrade.AdvancedHow do you find deprecated or removed APIs before an upgrade?IntermediateA cluster upgrade broke an operator because its CRD API version was removed. How do you recover?Advanced