The termination stage is the final Pod lifecycle stage. It begins when the Pod object is deleted: containers enter Terminating, shut down, and the Pod object is removed after every container stops. section 6.4 section 6.4.3
Container shutdown follows this sequence:
- Containers terminate in parallel. section 6.4.3
- Each container’s pre-stop hook runs, then its main process receives SIGTERM. section 6.4.3
- If the process remains alive when the deletion grace period expires, Kubernetes terminates it with SIGKILL. section 6.4.3
- Kubernetes deletes the Pod object after all containers stop. section 6.4.3
Controlling shutdown time
Set a five-second default grace period in a Pod manifest with terminationGracePeriodSeconds: 5, or request a ten-second period with kubectl delete po kiada-ssl --grace-period 10. section 6.4.3
