liveBook · Manning

Terminating

As explained in Kubernetes in Action, Second Edition

Terminating is a Kubernetes lifecycle status indicating that an object has been marked for deletion but has not yet been fully removed.

Terminating is a Kubernetes lifecycle status for an object marked for deletion but not yet fully removed. Deletion has begun, while dependent cleanup or shutdown is still in progress. section 6.4.3 section 7.1.5

The status can indicate different kinds of unfinished cleanup:

  • For a Pod, containers continue running during the deletion grace period; pre-stop hooks run, SIGTERM is sent, and KILL may follow when the period expires. section 6.4.3
  • For a Namespace, termination waits for its objects to be deleted; a remaining object or unremoved finalizer can keep deletion stuck. section 7.1.5
  • For a PersistentVolume or PersistentVolumeClaim, termination can remain blocked while a claim or Pod still uses the storage. section 10.3.3

Inspecting a stuck namespace

After requesting deletion, `kubectl get ns` can show `kiada-test2` with status `Terminating`. Inspecting its YAML exposes deletion conditions and helps identify whether content or finalization is preventing completion.

Figure 6.16 The termination sequence inside a pod
figure

Shows the Pod termination sequence from deletion through container shutdown and final object removal. section 6.4.3

How Kubernetes in Action, Second Edition covers it

How deep it goes
Works through Pod shutdown, namespace diagnosis, and storage dependencies, including grace periods and finalizers.
Examples
Uses kubectl output for terminating namespaces, Pods with slow shutdowns, and volumes blocked by claims or Pods.
What it assumes
Assumes familiarity with kubectl and Kubernetes objects while demonstrating deletion behavior through concrete Pods, namespaces, and storage resources.
What you can do after
Diagnose/debug with kubectl by inspecting status, deletion conditions, dependencies, grace periods, and finalizers.
How it connects
Connects deletion grace periods, finalizers, namespaces, Pods, PersistentVolumes, and PersistentVolumeClaims.

This explainer was generated by Manning's knowledge graph from the text of Kubernetes in Action, Second Edition. The section links point to the parts of the book it draws on.