⚡ ~/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 Deployments & Workloads Production Scenario [L2]

Q: Your CronJob is creating overlapping runs — the previous job hasn't finished when the next one starts. How do you fix it?

Set concurrencyPolicy: Forbid in the CronJob spec. This skips the new run if the previous one is still running.

#Kubernetes #Deployments & Workloads #L2 #Container Orchestration #K8s
🎙️ Candidate Opening & Architectural Context
""Kubernetes is a declarative desired state system; understanding the reconciliation loop is how you diagnose this quickly. 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️⃣

Initial Diagnostics & Root Cause Analysis

Set concurrencyPolicy: Forbid in the CronJob spec. This skips the new run if the previous one is still running.

  • Allow (default) — multiple jobs can run at the same time.
  • Forbid — skip the new run if old one still running.
  • Replace — kill the old run and start a new one.
2️⃣

Remediation & Permanent Safeguards

Options: Also check startingDeadlineSeconds — if a job is missed (e.g., cluster was down), Kubernetes may try to catch up on missed runs. --- ## 🟢 Networking

💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: Allow (default) — multiple jobs can run at the same time.."
⚡ 60-Second Elevator Pitch Talking Points
  • Allow (default) — multiple jobs can run at the same time.
  • Forbid — skip the new run if old one still running.
  • Replace — kill the old run and start a new one.
Advertisement
Want more Kubernetes scenarios?
Explore our complete collection of scenario-based Kubernetes interview runbooks.
Browse All Kubernetes Questions →

📚 Related Production Scenarios in Kubernetes