Terminating a pod
The sequence of shutdown events is similar to events while starting a pod. After receiving a deletion invocation, Kubernetes sends SIGTERM to the pod that is going to be deleted, and the pod's state becomes terminating. Meanwhile, Kubernetes removes the endpoint of that pod to stop further requests if the pod is backing a service. Occasionally, there are pods that don't quit at all. It could be that the pods don't honor SIGTERM, or simply because their tasks aren't completed. Under such circumstances, Kubernetes will send SIGKILL to forcibly kill those pods after the termination period. The period length is set at .spec.terminationGracePeriodSeconds under the pod specification. Even though Kubernetes has mechanisms to reclaim ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access