KubeGlanceDownload
Which resources show Terminating in kubectl get, and which silently do not

kubectl

Which resources show Terminating in kubectl get, and which silently do not

kubectl get shows Terminating for Pods, Jobs, PVs, PVCs and Namespaces. Deployments, StatefulSets, DaemonSets and ReplicaSets have no column for it.

ยท 8 min read

Terminating is not a state any object has. It is a word kubectl get prints when an object’s metadata.deletionTimestamp is set, and only five built-in printers ever print it: Pod, Job, PersistentVolume, PersistentVolumeClaim and Namespace. Deployment, StatefulSet, DaemonSet and ReplicaSet have no STATUS column at all, so one that is stuck on a finalizer looks exactly like a healthy one.

Even where the column exists, it does not always say Terminating. A finished pod or a completed Job that is being deleted keeps its old status, because kubectl checks for that first.

The fastest check

Stop reading the STATUS column and read the field it is derived from:

kubectl get deploy,sts,ds,rs -o custom-columns='KIND:.kind,NAME:.metadata.name,READY:.status.readyReplicas,DELETING:.metadata.deletionTimestamp,FINALIZERS:.metadata.finalizers'
KIND          NAME                        READY    DELETING               FINALIZERS
Deployment    deploy-healthy              1        <none>                 <none>
Deployment    deploy-held                 1        2026-09-25T11:04:50Z   [example.com/hold]
StatefulSet   sts-healthy                 1        <none>                 <none>
StatefulSet   sts-held                    1        2026-09-25T11:04:50Z   [example.com/hold]
DaemonSet     ds-healthy                  <none>   <none>                 <none>
DaemonSet     ds-held                     <none>   2026-09-25T11:04:50Z   [example.com/hold]
ReplicaSet    rs-healthy                  1        <none>                 <none>
ReplicaSet    rs-held                     1        2026-09-25T11:04:50Z   [example.com/hold]

Any row with a DELETING value has been deleted and is being held. The FINALIZERS column tells you by whom. To list only those, across every namespace, filter in jsonpath:

kubectl get deploy,sts,ds,rs,job,pod,pvc -A -o jsonpath='{range .items[?(@.metadata.deletionTimestamp)]}{.kind}{"\t"}{.metadata.namespace}/{.metadata.name}{"\t"}{.metadata.deletionTimestamp}{"\t"}{.metadata.finalizers}{"\n"}{end}'
Deployment	k24term/deploy-held	2026-09-25T11:04:50Z	["example.com/hold"]
StatefulSet	k24term/sts-held	2026-09-25T11:04:50Z	["example.com/hold"]
DaemonSet	k24term/ds-held	2026-09-25T11:04:50Z	["example.com/hold"]
ReplicaSet	k24term/rs-held	2026-09-25T11:04:50Z	["example.com/hold"]
Job	k24term/job-complete	2026-09-25T11:04:50Z	["example.com/hold"]
Job	k24term/job-running	2026-09-25T11:04:50Z	["example.com/hold"]
Pod	k24term/failed	2026-09-25T11:04:50Z	["example.com/hold"]
...
PersistentVolumeClaim	k24term/data	2026-09-25T11:04:50Z	["example.com/hold"]

Everything below was reproduced on Kubernetes 1.36.1 with kubectl 1.36.5, by putting a dummy finalizer, example.com/hold, on one of each kind and deleting it. The printer source was read on both release-1.36 and release-1.37; the logic is identical on both, and only the line numbers differ.

Why it happens

The API server does not send a status string. It sends the object, and kubectl turns it into a table row using a per-kind print function in pkg/printers/internalversion/printers.go. Deletion itself is the same for every kind: the API server sets deletionTimestamp, and while metadata.finalizers is non-empty the object stays. What differs is whether the printer for that kind ever looks at the timestamp, and what it checks before it does.

Deletion is uniform. Printing is not: each kind's printer decides whether deletionTimestamp is worth a word, and some check other things first.
KindSTATUS columnWhen it says TerminatingSource (release-1.36 / release-1.37)
Podyesdeleting, and phase is not Succeeded or FailedL1064 / L1107
Jobyesdeleting, and not already Complete or FailedL1283 / L1326
PersistentVolumeyeswhenever deletingL2107 / L2150
PersistentVolumeClaimyeswhenever deletingL2144 / L2187
Namespaceyesprints status.phase, which the API server setsL1922 / L1965
Deploymentnoneverdefs L345 / L351
StatefulSetnoneverdefs L233 / L239
DaemonSetnoneverdefs L156 / L162
ReplicaSetnoneverdefs L143 / L149

The five that show it

PersistentVolumes and PersistentVolumeClaims are the simple case: the check replaces the phase outright, so a bound claim being deleted reads Terminating no matter what.

NAME   STATUS        VOLUME       CAPACITY   ACCESS MODES   STORAGECLASS   VOLUMEATTRIBUTESCLASS   AGE
data   Terminating   k24term-pv   1Gi        RWO                           <unset>                 24s

NAME         CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS        CLAIM          STORAGECLASS   VOLUMEATTRIBUTESCLASS   REASON   AGE
k24term-pv   1Gi        RWO            Retain           Terminating   k24term/data                  <unset>                          24s

Namespace is different in kind, not just in degree. Its printer does not look at deletionTimestamp at all; it prints status.phase, and the API server itself writes Terminating into that field at the moment of deletion (pkg/registry/core/namespace/storage/storage.go, release-1.36 L200-201). So Namespace is the one case where Terminating really is stored state. The conditions say what is holding it:

kubectl get ns k24term-doomed -o jsonpath='{.spec.finalizers}{"\n"}{.status.phase}{"\n"}{range .status.conditions[*]}{.type}{"\t"}{.status}{"\t"}{.message}{"\n"}{end}'
["kubernetes"]
Terminating
NamespaceDeletionDiscoveryFailure	False	All resources successfully discovered
NamespaceDeletionGroupVersionParsingFailure	False	All legacy kube types successfully parsed
NamespaceDeletionContentFailure	False	All content successfully deleted, may be waiting on finalization
NamespaceContentRemaining	True	Some resources are remaining: configmaps. has 1 resource instances
NamespaceFinalizersRemaining	True	Some content in the namespace has finalizers remaining: example.com/hold in 1 resource instances

Pods and Jobs show Terminating too, but with conditions that trip people up. Those get their own section below.

The four that do not

Here are a healthy and a held copy of each workload controller, after the held ones were deleted:

kubectl get deploy,sts,ds,rs
NAME                             READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/deploy-healthy   1/1     1            1           24s
deployment.apps/deploy-held      1/1     1            1           24s

NAME                           READY   AGE
statefulset.apps/sts-healthy   1/1     24s
statefulset.apps/sts-held      1/1     24s

NAME                        DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
daemonset.apps/ds-healthy   1         1         1       1            1           <none>          24s
daemonset.apps/ds-held      1         1         1       1            1           <none>          24s

NAME                                        DESIRED   CURRENT   READY   AGE
replicaset.apps/deploy-healthy-5fc6cbc498   1         1         1       24s
replicaset.apps/deploy-held-66c7959984      1         1         1       24s
replicaset.apps/rs-healthy                  1         1         1       24s
replicaset.apps/rs-held                     1         1         1       24s

Apart from the names, the held rows match the healthy ones exactly. The column definitions for these four kinds contain no Status entry, and their print functions never read deletionTimestamp. -o wide adds containers and images (and selector, except for StatefulSet), and still nothing about deletion.

Worse, the pods keep running. With the default background cascade, the garbage collector removes dependents only after the owner is actually gone, so a Deployment held by a finalizer keeps its ReplicaSet (note deploy-held-66c7959984 above, which has no deletionTimestamp of its own) and its pods, at full readiness. A StatefulSet wedged on an operator’s finalizer will serve traffic indefinitely while everyone assumes it was removed.

This has been proposed upstream. kubernetes/kubernetes#141660, “Show Terminating status for StatefulSets in kubectl get”, would have added a STATUS column to StatefulSet reading Active or Terminating. It received /ok-to-test but no review, and its author closed it unmerged on 9 September 2026. No such column exists on release-1.37.

Two ordering traps

A finished pod keeps Completed or Error

The Pod printer computes a reason from the containers first, and only then applies the deletion check, guarded by !IsPodPhaseTerminal. A pod in phase Succeeded or Failed never reads Terminating, however long it is held:

kubectl get pod running succeeded failed -o custom-columns='NAME:.metadata.name,PHASE:.status.phase,DELETED:.metadata.deletionTimestamp,FINALIZERS:.metadata.finalizers,REASON:.status.containerStatuses[0].state.terminated.reason,EXIT:.status.containerStatuses[0].state.terminated.exitCode'
NAME        PHASE       DELETED                FINALIZERS           REASON      EXIT
running     Failed      2026-09-25T11:04:53Z   [example.com/hold]   Error       137
succeeded   Succeeded   2026-09-25T11:04:50Z   [example.com/hold]   Completed   0
failed      Failed      2026-09-25T11:04:50Z   [example.com/hold]   Error       1

kubectl get pods prints those as Error, Completed and Error.

The first row is the part that catches people out. running was a sleep 3600 pod with a normal restartPolicy: Always. It was still running when it was deleted. Once the kubelet had killed the container, it wrote the pod’s phase as Failed, and from then on the printer’s guard applies. On a healthy node, then, a pod held by a finalizer reads Terminating only until its grace period runs out:

kubectl get pod slow
NAME   READY   STATUS        RESTARTS   AGE
slow   1/1     Terminating   0          5s

The same pod, with terminationGracePeriodSeconds: 60, a minute later:

NAME   READY   STATUS   RESTARTS   AGE
slow   0/1     Error    0          73s

It has not been deleted. It still has a deletionTimestamp and its finalizer. If you are hunting for a stuck pod by grepping for Terminating, you will miss it. (One more branch sits above this one: a deleted pod on a node marked unreachable prints Unknown, release-1.37 L1104-1105.)

A completed Job keeps Complete

The Job printer checks the Complete condition, then Failed, and only then deletionTimestamp:

kubectl get jobs
NAME           STATUS        COMPLETIONS   DURATION   AGE
job-complete   Complete      1/1           3s         24s
job-running    Terminating   0/1           24s        24s

Both Jobs were deleted at the same moment and both carry the same finalizer. Only the one that had not finished says so. Finished Jobs are exactly the ones a cleanup script deletes, so this is the common case, not the edge case.

Fixing it

Find everything with a deletion pending. For the whole cluster, across every listable kind:

kubectl api-resources --verbs=list -o name | xargs -n1 kubectl get -A --ignore-not-found -o jsonpath='{range .items[?(@.metadata.deletionTimestamp)]}{.kind}{"\t"}{.metadata.namespace}/{.metadata.name}{"\t"}{.metadata.finalizers}{"\n"}{end}'
ConfigMap	k24term-doomed/held	["example.com/hold"]
Namespace	/k24term-doomed	
PersistentVolumeClaim	k24term/data	["example.com/hold"]
PersistentVolume	/k24term-pv	["example.com/hold","kubernetes.io/pv-protection"]
...
StatefulSet	k24term/sts-held	["example.com/hold"]

That took about two seconds on a one-node cluster, and prints deprecation warnings for ComponentStatus and Endpoints on stderr. The Namespace line has empty finalizers because a Namespace keeps its blocking finalizer in spec.finalizers, not metadata.finalizers; read its conditions as above.

Each finalizer string belongs to a controller. The right fix is to get that controller running again, or to delete whatever external resource it is waiting to clean up, and let it remove its own entry. The reasoning is the same as for pods, covered in pod stuck in Terminating.

When the controller is gone for good, remove the finalizer yourself:

kubectl patch statefulset sts-held --type=merge -p '{"metadata":{"finalizers":null}}'
statefulset.apps/sts-held patched

The object disappears as soon as the list is empty. Setting the list to null removes every finalizer on the object, so where Kubernetes has its own alongside yours, remove only yours by index. The PersistentVolume above carried kubernetes.io/pv-protection second:

kubectl patch pv k24term-pv --type=json -p '[{"op":"remove","path":"/metadata/finalizers/0"}]'
persistentvolume/k24term-pv patched

Preventing it

  • Do not treat STATUS as universal. It is a per-kind choice in kubectl, and for workload controllers the choice is to say nothing. For pods, the column logic is covered in full in how kubectl decides what to put in the STATUS column.
  • Alert on the field, not the word. Any check that greps for Terminating misses held workloads, finished pods and completed Jobs. Filter on metadata.deletionTimestamp instead.
  • Uninstall operators after their resources, not before. An operator’s finalizers are only removed by the operator. Remove its custom resources and wait for them to go before removing the controller.
  • Wait for the delete in scripts. kubectl delete waits by default; --wait=false returns as soon as the timestamp is set, which proves nothing about whether the object will go.

When the table cannot tell you, the object can. KubeGlance is a native Kubernetes client for iPhone and iPad, with a full Mac app on the same core โ€” pod detail, events and workload state straight from your kubeconfig.

Get KubeGlance
#kubectl #terminating #finalizers #statefulset #deployment

The Kubernetes dashboard that fits in your pocket

KubeGlance is a native Kubernetes client for iPhone and iPad โ€” the real dashboard, not a companion โ€” with a full Mac app on the same core. Pods, workloads, logs and events, straight from your kubeconfig.

Download KubeGlance