---
source: https://iinventedlight.com/library/notes/kubernetes-finalizers.md
title: "Kubernetes finalizers - why objects stay in Terminating and how deletion completes"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (Kubernetes docs); CC-BY-4.0 (kubernetes/website (GitHub)); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Finalizers; kubernetes/website (GitHub), finalizers.md (source page). CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-18
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-18
as_of: 2026-11-18
confidence: medium
untested: "Not reproduced (2026-11-18). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: kubernetes finalizers"
tags: [kubernetes, finalizers, deletion, garbage-collection, controllers]
client: Librarian
sources:
  - id: S1
    title: "Finalizers"
    publisher: Kubernetes docs
    url: https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/
    accessed: 2026-11-18
    license: "CC-BY-4.0"
  - id: S2
    title: "finalizers.md (source page)"
    publisher: kubernetes/website (GitHub)
    url: https://github.com/kubernetes/website/blob/main/content/en/docs/concepts/overview/working-with-objects/finalizers.md
    accessed: 2026-11-18
    license: "CC-BY-4.0"
---
# Kubernetes finalizers - why objects stay in Terminating and how deletion completes
**Answer:** Finalizers are keys in `metadata.finalizers` that make the API server hold an object until controllers finish cleanup. They alert controllers to run specific cleanup tasks first, which gives you control over garbage collection.

## Example

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: demo
  finalizers:
  - example.com/cleanup-bucket
```

```shell
kubectl get pv my-volume -o jsonpath='{.metadata.finalizers}'
kubectl get pv my-volume -o jsonpath='{.metadata.deletionTimestamp}'
```

## What happens on delete

1. The API server adds a `metadata.deletionTimestamp` with the time you started the deletion.
2. It prevents the object from being removed until all items are removed from `metadata.finalizers`, and returns `202` (Accepted).
3. The controller for that finalizer notices the deletion request, satisfies its requirements, and removes its key from `finalizers`.
4. When the `finalizers` field is emptied, the object is automatically deleted.

## Rules

- Once deletion starts you can remove existing finalizers but you cannot add a new finalizer, and you cannot modify the `deletionTimestamp`.
- After the deletion is requested, you can not resurrect this object; delete it and make a new similar object.
- Custom finalizer names must be publicly qualified, such as `example.com/finalizer-name`; the API server rejects writes that use unqualified names.
- Finalizers don't usually specify the code to execute; they are lists of keys, similar to annotations.

## Common example

`kubernetes.io/pv-protection` prevents accidental deletion of a `PersistentVolume` in use by a Pod. Deleting it leaves it in `Terminating` until the Pod stops using it, then Kubernetes clears the finalizer and the volume is deleted.

## Stuck objects

Finalizers can block the deletion of dependent objects, so an owner may remain longer than expected. Check finalizers and owner references on both objects. Avoid manually removing finalizers; only do it when the finalizer's purpose is understood and accomplished in another way.

## See also

- [kubernetes-owners-dependents](https://iinventedlight.com/library/notes/kubernetes-owners-dependents/)
- [kubernetes-persistent-volumes](https://iinventedlight.com/library/notes/kubernetes-persistent-volumes/)
- [kubernetes-namespaces](https://iinventedlight.com/library/notes/kubernetes-namespaces/)

## Claims

- id: C1
  claim: The API server returns 202 Accepted for a delete with finalizers.
  source: S2
  evidence: "Returns a `202` status code (HTTP \"Accepted\")"

- id: C2
  claim: Custom finalizer names must be publicly qualified.
  source: S2
  evidence: "Custom finalizer names **must** be publicly qualified finalizer names"

- id: C3
  claim: Deleted objects can not be resurrected.
  source: S1
  evidence: "After the deletion is requested, you can not resurrect this object."

## Sources

- [S1] Finalizers. Kubernetes docs. https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/ . License: CC-BY-4.0. Accessed 2026-11-18.

- [S2] finalizers.md (source page). kubernetes/website (GitHub). https://github.com/kubernetes/website/blob/main/content/en/docs/concepts/overview/working-with-objects/finalizers.md . License: CC-BY-4.0. Accessed 2026-11-18.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Finalizers; kubernetes/website (GitHub), finalizers.md (source page). CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
