Kubernetes interview question · Most asked

Your application on Kubernetes has intermittent 502/503 errors during deployments. What would you investigate?

Summary

Look at readiness and shutdown behaviour first: pods receiving traffic before they are ready (missing or wrong readiness probe), pods killed while the load balancer still routes to them (no SIGTERM handling, no preStop delay, too-short grace period), and keep-alive connections held to terminating pods. Then check rollout settings and capacity.

Longer Answer

Checklist: does readiness reflect real readiness (warm-up, connections established)? Does the app drain on SIGTERM? Is there a preStop sleep long enough for endpoint propagation and the external load balancer's deregistration delay? Does maxUnavailable drop capacity too far? Are idle timeouts of the load balancer and the app aligned (the app's keep-alive timeout should be longer than the load balancer's)? Correlate error timestamps with pod lifecycle events.

Key Points

  • Readiness before traffic.
  • Graceful shutdown + preStop delay.
  • Keep-alive and idle timeout alignment.
  • Rollout capacity settings.

Deep dive: Resilience Patterns

More most-asked Kubernetes questions

← All Kubernetes questions