⚡ ~/naveed Interview Prep
⚡ Portfolio Home ✍️ Engineering Blog Deep Dives 🎯 Interview Hub 998+ Scenarios ☸️ Kubernetes Mastery Hub 24 Modules 🎮 DevOps Arcade & Quizzes Subnet Blitz ⚡ 🗺️ DevOps Roadmaps PDFs & Guides 🤖 Morpheus Analysis AI Quant ↗ 🛠️ Developer Tools Utilities 🧪 Labs & Experiments 📄 Interactive CV & Certs 🔗 All Links & Socials ⚡ Join The Dispatch (Weekly SRE Newsletter) →
Senior DevOps / SRE [L2] Kubernetes Troubleshooting & Debugging Production Scenario [L2]

Q: You run `kubectl exec -it <pod> -- bash` and get "container not found." What's wrong?

If a pod has multiple containers, you need to specify which one:

#Kubernetes #Troubleshooting & Debugging #L2 #Container Orchestration #K8s
🎙️ Candidate Opening & Architectural Context
""In our production Kubernetes clusters running microservices on EKS/AKS, this was a classic operational challenge. The interviewer is testing: Multi-container pod awareness.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third.""
Advertisement

🛠️ Production Runbook & Step-by-Step Resolution

1️⃣

Production Solution & Architecture

If a pod has multiple containers, you need to specify which one: Get container names with: kubectl get pod -o jsonpath='{.spec.containers[*].name}' Also — some minimal images (Alpine, distroless) don't have bash. Try sh instead.

kubectl exec -it <pod> -c <container-name> -- bash
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: If a pod has multiple containers, you need to specify which one:."
⚡ 60-Second Elevator Pitch Talking Points
  • Immediate Triage: If a pod has multiple containers, you need to specify which one:
  • Run targeted verification commands before modifying configuration.
  • Automate permanent guardrails (CI check, alerts, IaC policy) to prevent recurrence.
Advertisement
Want more Kubernetes scenarios?
Explore our complete collection of scenario-based Kubernetes interview runbooks.
Browse All Kubernetes Questions →

📚 Related Production Scenarios in Kubernetes