Kubernetes owner references - how ReplicaSets own Pods and cascading deletion works
Answer: Dependent objects have a metadata.ownerReferences field that references their owner object, such as the ReplicaSet that owns a set of Pods. Kubernetes sets it automatically for ReplicaSets, DaemonSets, Deployments, Jobs and CronJobs, and the garbage collector uses it to clean up dependents.
Example
metadata:
name: web-7d4b9c-abcde
ownerReferences:
- apiVersion: apps/v1
kind: ReplicaSet
name: web-7d4b9c
uid: 0f1e2d3c-1111-2222-3333-444455556666
controller: true
blockOwnerDeletion: true
kubectl get pod web-7d4b9c-abcde -o jsonpath='{.metadata.ownerReferences}'
kubectl get events -A --field-selector=reason=OwnerRefInvalidNamespace
Owner references versus labels
Ownership is different from the labels and selectors mechanism: a Service uses labels to find its EndpointSlice objects, and each managed EndpointSlice also has an owner reference. This keeps parts of Kubernetes from interfering with objects they don't control.
Rules
- An owner reference names the owner and its UID, and must point within the namespace of the dependent object.
- Cross-namespace owner references are disallowed by design. A namespaced owner must exist in the same namespace as the dependent, or the reference is treated as absent.
- Cluster-scoped dependents can only specify cluster-scoped owners; an invalid reference produces a warning Event with reason
OwnerRefInvalidNamespace. ownerReferences.blockOwnerDeletioncontrols whether a dependent can block garbage collection from deleting its owner. Controllers set it totrueautomatically.
Cascading deletion and finalizers
- In foreground deletion, Kubernetes adds the
foregroundfinalizer, so dependents withblockOwnerDeletion=trueare deleted before the owner. - With an orphan deletion policy, Kubernetes adds the
orphanfinalizer, and the controller ignores dependent resources after it deletes the owner. - Finalizers such as
kubernetes.io/pv-protectioncan keep an object inTerminatinguntil it is no longer in use.
See also
Claims
- id: C1 claim: Cross-namespace owner references are disallowed by design. source: S2 evidence: "Cross-namespace owner references are disallowed by design."
- id: C2 claim: Orphan deletion leaves dependents in place. source: S2 evidence: "the controller ignores dependent resources after it deletes the owner object."
- id: C3 claim: Owner references must be in the same namespace as the dependent. source: S1 evidence: "within the same namespace as the dependent object."
Sources
- [S1] Owners and Dependents. Kubernetes docs. https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/ . License: CC-BY-4.0. Accessed 2026-11-18.
- [S2] owners-dependents.md (source page). kubernetes/website (GitHub). https://github.com/kubernetes/website/blob/main/content/en/docs/concepts/overview/working-with-objects/owners-dependents.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, Owners and Dependents; kubernetes/website (GitHub), owners-dependents.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.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Owners and Dependents; kubernetes/website (GitHub), owners-dependents.md (source page). CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors.
Cite this
iinventedlight. 2026. "Kubernetes owner references - how ReplicaSets own Pods and cascading deletion works." iinventedlight Library, iil:note:r79nxxec, version of 2026-11-18. https://iinventedlight.com/library/notes/kubernetes-owners-dependents/. License: CC-BY-4.0.
@misc{iil_note_r79nxxec,
author = {{iinventedlight}},
title = {{Kubernetes owner references - how ReplicaSets own Pods and cascading deletion works}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-18},
url = {https://iinventedlight.com/library/notes/kubernetes-owners-dependents/},
note = {Permanent ID iil:note:r79nxxec. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/kubernetes-owners-dependents.md.