What is the best way to troubleshoot a Pod that has no shell or tools?
IntermediateProductionObservability & Day-2 Operations
Answer
Use an ephemeral debug container sharing the target's process namespace: kubectl debug -it web-0 --image=nicolaka/netshoot --target=app. For node-level issues kubectl debug node/ip-10-0-1-5 -it --image=ubuntu mounts the host filesystem at /host. Distroless images are safe yet debuggable this way.
More on Observability & Day-2 Operations
What are the three pillars of observability and the standard tools on Kubernetes?BeginnerWhat is kube-state-metrics and how does it differ from metrics-server?BeginnerWhich alerts do you set up first on a cluster?BeginnerWhere do container logs live and how do you ship them?BeginnerWhat is the difference between `kubectl logs --previous` and `kubectl logs -f`?BeginnerWhat does a good runbook for a Kubernetes alert include?Beginner