Diagnostic step 1
Update application to handle SIGTERM by: (a) closing the HTTP listener or immediately returning non-200 on readiness endpoint, and (b) finishing cleanup asynchronously before exit. Deploy this change in a canary first.
Generated Oct 26, 2026, 9:23:15 AM
Update application to handle SIGTERM by: (a) closing the HTTP listener or immediately returning non-200 on readiness endpoint, and (b) finishing cleanup asynchronously before exit. Deploy this change in a canary first.
Use readinessGate or add an explicit 'drain' readiness endpoint: on SIGTERM set readiness false immediately, which signals kubelet and ingress to stop routing new traffic.
Increase terminationGracePeriodSeconds to allow background cleanup, and tune Ingress healthcheck intervals to detect readiness change faster if safe.
Test in staging by sending continuous traffic while performing rollout and observe that in-flight requests finish and 503s no longer appear.
If application cannot close listener quickly, implement client-side retries or a preStop that notifies a sidecar to mark pod not ready before heavy cleanup starts.