⚡ ~/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) →
Staff SRE / Principal Architect [L3] Kubernetes Advanced Scenarios Staff SRE Scenario [L3]

Q: You need to run a pod that will only start after a specific ConfigMap exists in the cluster. How do you implement this?

Use an init container that polls for the ConfigMap:

#Kubernetes #Advanced Scenarios #L3 #Container Orchestration #K8s
🎙️ Candidate Opening & Architectural Context
""In one of our high-traffic production clusters, our SRE team handled this incident using a standardized runbook. When addressing this question, I walk the interviewer through our production incident runbook: isolating the blast radius, checking diagnostic logs and metrics, and applying a safe fix.""
Advertisement

🛠️ Production Runbook & Step-by-Step Resolution

1️⃣

Production Solution & Architecture

Use an init container that polls for the ConfigMap: The init container keeps checking every 5 seconds until the ConfigMap exists, then exits (allowing the main container to start). This pattern is common for sequencing: wait for a database to be ready, wait for a service to exist, wait for a secret to be populated.

initContainers:
- name: wait-for-config
  image: bitnami/kubectl
  command: ['sh', '-c', 'until kubectl get configmap my-config; do echo waiting; sleep 5; done']
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: Use an init container that polls for the ConfigMap:."
⚡ 60-Second Elevator Pitch Talking Points
  • Immediate Triage: Use an init container that polls for the ConfigMap:
  • 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