K8S Garbage Collection
Last updated
Was this helpful?
Last updated
Was this helpful?
Cascading deletion: When deleting an object, one can specify whether the object's dependents are also deleted automatically. Deleting the dependents automatically is called cascading deletion.
Root object first enters "deletion in progress" state
The object is still available via REST API
deletionTimestamp
is set
metadata.finalizers
contains the value of foregroundDeletion
Garbage collector deletes the object's dependents
Once the garbage collector has deleted all “blocking” dependents (objects with ownerReference.blockOwnerDeletion=true
), it deletes the owner object. Otherwise the deletion of the objects will be blocked
In background cascading deletion, Kubernetes deletes the owner object immediately and the garbage collector then deletes the dependents in the background.
Checkout the