October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

Who Deletes Resources Created by a Kubernetes Operator?

Kubernetes operator-created resources may be cleaned up by the operator controller or garbage collector; owner references, propagation policy and finalizers determine what happens.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

It depends on how the operator and its resources are configured. The operator’s controller may perform cleanup itself; Kubernetes’ garbage collector removes dependent Kubernetes objects when valid owner references connect them and deletion is cascading. Finalizers can hold an object in a terminating state until a controller completes required cleanup.

What determines who deletes the resource?

An operator watches custom resources and reconciles them toward the desired state. When a custom resource is deleted, the operator may have cleanup logic of its own. Separately, Kubernetes can delete dependent objects through garbage collection when their metadata.ownerReferences establish the ownership relationship and deletion propagation allows cascading cleanup.

As an Amazon Associate I earn from qualifying purchases.

Kubernetes Documentation explains: “Many objects in Kubernetes link to each other through owner references. Owner references tell the control plane which objects are dependent on others.” Kubernetes Garbage Collection documentation

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Labels and selectors can help an operator find or manage objects, but they do not by themselves create the owner-reference relationship used by Kubernetes garbage collection. Scope matters too: a namespaced owner must be in the same namespace as its dependent, and a cluster-scoped dependent can only refer to a cluster-scoped owner. Kubernetes Owners and Dependents documentation

#1 Best Overall

How deletion propagation changes the result

When an owner is deleted, Kubernetes’ propagation policy affects whether and when its dependents are removed. The three relevant policies are:

Policy What happens to the owner What happens to dependents
Background The owner is removed promptly. The garbage collector removes dependents afterward in the background, so they may briefly remain visible.
Foreground The owner remains visible while dependent cleanup is underway. Cleanup of dependents precedes removal of the owner.
Orphan The owner is removed. Dependents are deliberately left behind.

The default background policy means an owner disappearing from the API does not prove its dependents have already been cleaned up. Orphan propagation, by contrast, is an intentional way to retain dependents. Kubernetes Use Cascading Deletion documentation

Why a finalizer can keep an object around

A finalizer is a deletion gate, not a deletion command. When deletion is requested for an object with finalizers, Kubernetes records a deletion timestamp and leaves the object in a terminating state. The controller responsible for a finalizer must complete the associated work and remove that finalizer before Kubernetes can fully delete the object.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

As Kubernetes Documentation puts it: “Finalizers are namespaced keys that tell Kubernetes to wait until specific conditions are met before it fully deletes resources that are marked for deletion.” Kubernetes Finalizers documentation

Finalizers may also delay dependent cleanup from completing. Do not remove one blindly: first identify its purpose and, where possible, allow or perform the intended cleanup. Removing it without understanding the work it guards can leave resources or external infrastructure behind. Kubernetes Finalizers documentation

How to diagnose a resource that remains

  1. Check the dependent’s owner references. Inspect metadata.ownerReferences and verify the owner’s UID and kind, as well as the namespace and scope relationship. A matching label is not enough to establish garbage-collection ownership. Kubernetes Owners and Dependents documentation
  2. Check deletion timestamps and finalizers. Examine the custom resource and the dependent for a deletion timestamp and remaining finalizers. A finalizer indicates that a controller or cleanup step has not yet completed. Kubernetes Finalizers documentation
  3. Establish the propagation policy. Determine whether deletion was background, foreground or orphan. Background cleanup may still be in progress after the owner vanishes; orphan deletion intentionally retains dependents. Kubernetes Use Cascading Deletion documentation
  4. Check the operator’s cleanup behavior. Garbage collection covers Kubernetes objects connected by ownership references. Resources without those references, and infrastructure outside the Kubernetes API, may depend on explicit cleanup implemented by the operator. The behavior is operator-specific.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

So, who is responsible?

The operator is responsible for the cleanup behavior its implementation requires. Kubernetes garbage collection is responsible for cascading deletion of Kubernetes dependents connected by valid owner references. Finalizers let a controller delay full deletion until required cleanup is done. Which mechanism applies to a particular resource depends on its ownership metadata, deletion policy, finalizers and the operator’s implementation.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.