During every rollout, the old Pods take exactly 30 seconds to die and logs show the app never received `SIGTERM`.
IntermediateTroubleshootingResources, OOM, probes and termination
Answer
Likely causes → PID 1 in the container is a shell (CMD npm start or sh -c "java ...") that does not forward signals. The app never sees SIGTERM and gets SIGKILL after terminationGracePeriodSeconds (30s default), dropping in-flight requests.
Diagnose →
kubectl exec web-x -- ps -o pid,args | head -3
Fix → Use exec-form CMD and exec in wrapper scripts:
CMD ["node", "server.js"]
# or in entrypoint.sh: exec java -jar /app.jar
Or add tini as init (ENTRYPOINT ["tini", "--"]).
Prevent → Graceful shutdown test in CI: send SIGTERM and assert the process exits cleanly within a few seconds.
More on Resources, OOM, probes and termination
`kubectl describe pod` shows `Last State: Terminated, Reason: OOMKilled, Exit Code: 137`.BeginnerA Java service is OOMKilled at 2 GiB limit but the heap is only `-Xmx1800m`.IntermediateMany Pods on one node were killed at once and the node shows a `SystemOOM` event. Container limits were not reached.AdvancedPods show `Evicted` with `The node was low on resource: memory. Threshold quantity: 100Mi, available: 87Mi. Container app was using 1.4Gi, request is 256Mi`.IntermediateA Pod is evicted with `Pod ephemeral local storage usage exceeds the total limit of containers 1Gi`.Intermediatep99 latency spikes every few seconds, CPU usage graph shows only 40% of the limit.Advanced