⚡ ~/naveed Interview Prep
⚡ Portfolio Home 👤 About Naveed Bio & Credentials 📫 Contact Naveed Get In Touch ✍️ Engineering Blog Deep Dives 🎯 Interview Hub 1,000+ 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) →
← Back to All Linux & SRE Interview Questions Scenario 35 of 135 in Linux & SRE
Senior DevOps / SRE [L2] General DevOps General DevOps — Scenario-Based Interview Questions Production Scenario [L2]
🎯 Target Role / Context: General DevOps Scenario #32 (L2) · General DevOps — Scenario-Based Interview Questions

Q: A stateless web application runs on Kubernetes. During a deployment of a new image, users report intermittent HTTP 502 Bad Gateway errors for a few seconds. What is missing in the Pod configuration?

Two core settings are likely missing or misconfigured:

#General DevOps #L2 #DevOps #SRE #Architecture
🎙️ Candidate Opening & Architectural Context
""Senior DevOps is about building reliable automated feedback loops between code commit and production observability. The interviewer is testing: Readiness probes, graceful shutdown, zero-downtime deployments.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third.""
Advertisement
⚡ Recommended Practice Lab

Want to master this scenario in a live sandbox? The Linux Foundation's Certified System Administrator (LFCS) & SRE Track covers this exact problem with hands-on terminal drills.

🛠️ Production Runbook & Step-by-Step Resolution

Direct Answer: "Senior DevOps is about building reliable automated feedback loops between code commit and production observability. The interviewer is testing: Readiness probes, graceful shutdown, zero-downtime deployments.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third."

1️⃣

Initial Diagnostics & Root Cause Analysis

Two core settings are likely missing or misconfigured:

  • Readiness Probes: The new container starts, and Kubernetes instantly sends traffic to it before the internal application framework (like Spring Boot or Node.js) has fully initialized its HTTP listeners. A readinessProbe ensures the Service doesn't route traffic to the Pod until a specific path (e.g., /health) returns HTTP 200.
  • Graceful Shutdown (SIGTERM handling): When the old Pod is deleted, Kubernetes sends a SIGTERM. If the application exits instantly, any requests currently in flight are abruptly dropped (HTTP 502). The application must catch the SIGTERM, stop accepting new connections, finish processing in-flight requests, and gracefully exit.
2️⃣

Remediation & Permanent Safeguards

💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: Readiness Probes: The new container starts, and Kubernetes instantly sends traffic to it before the internal application framework."
⚡ 60-Second Elevator Pitch Talking Points
  • Readiness Probes: The new container starts, and Kubernetes instantly sends traffic to it before t...
  • Graceful Shutdown (SIGTERM handling): When the old Pod is deleted, Kubernetes sends a SIGTERM. If...
⛔ Critical Candidate Mistakes to Avoid in This Scenario

Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:

  1. Confusing ALB 502 Bad Gateway (target connection reset) with 504 Gateway Timeout (upstream response timeout) when configuring General stateless application 502 indicates the backend target closed the TCP connection prematurely or returned malformed HTTP, whereas 504 means the target failed to respond before idle timeout.
  2. Setting target deregistration delay to zero instead of allowing connection draining when configuring General stateless application Instant target deregistration severs in-flight HTTP requests during auto-scaling scale-in or rolling deployments, causing immediate user-facing drops.
  3. Failing to query CloudWatch ELB metrics (HTTPCode_ELB_5XX vs HTTPCode_Target_5XX) during load balancer outages when configuring General stateless application Comparing load balancer generated errors against target generated errors immediately isolates whether the issue lies in the proxy tier or application runtime.
  4. Overlooking Security Group rules on backend EC2/ECS instances that block health check traffic from the ALB when configuring General stateless application Target instances must explicitly permit inbound HTTP/HTTPS traffic from the ALB security group on the configured container/application port.
Advertisement
Want more Linux & SRE scenarios?
Explore our complete collection of scenario-based Linux & SRE interview runbooks.
Browse All Linux & SRE Questions →