What exactly happens when a Pod is deleted (graceful termination sequence)?
AdvancedConceptPods & Workloads
Answer
The API server sets deletionTimestamp; the Pod goes Terminating and is removed from Service endpoints. The kubelet runs the preStop hook, sends SIGTERM to PID 1 of each container, waits terminationGracePeriodSeconds (default 30), then SIGKILL. Endpoint removal and SIGTERM race, which is why apps often need a short preStop sleep.