liveBook · Manning

Termination grace period

A termination grace period is the time Kubernetes allows a Pod's containers to shut down gracefully before forcibly terminating them.

How 2 Manning books explain it

Kubernetes in Action, Second Edition

The terminationGracePeriodSeconds field specifies the default number of seconds Kubernetes allows a pod's containers to terminate gracefully.

How it is used
Controls how long Kubernetes lets a container exit gracefully before forcing termination.
How deep it goes
Explains hooks, SIGTERM, KILL, defaults, restart behavior, and deletion-period overrides.
Examples
Uses the kiada-ssl pod, a five-second manifest, kubectl deletion, and a SIGTERM handler.
What you can do after
Operate Kubernetes shutdowns by configuring grace periods and diagnosing applications that ignore SIGTERM.

Read how Kubernetes in Action, Second Edition explains termination grace period →

Kubernetes for Developers

A termination grace period is the amount of time Kubernetes allows a Pod to terminate gracefully before forced termination.

How it is used
Protects in-flight requests and tasks during Pod replacement, node upgrades, and other disruptions.
How deep it goes
Explains SIGTERM handling, workload-specific durations, and a 120-second configuration, but not the full termination internals.
Examples
Uses a Python queue worker that stops accepting jobs and receives a 120-second termination window.
What you can do after
Operate/configure Kubernetes workloads to drain current work safely during termination.

Read how Kubernetes for Developers explains termination grace period →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.