Skip to content
Latchkey

What Is a Finalizer?

A finalizer is a key added to a Kubernetes object that pauses its deletion so a controller can run cleanup first. When a delete is requested, the object is marked for deletion but kept until every finalizer is removed. The owning controller performs tasks like releasing external resources, then strips its finalizer to let deletion finish.

Why it matters

Some resources own external state, such as a cloud load balancer, that must be torn down before the object disappears. Finalizers guarantee that cleanup happens rather than leaving orphaned infrastructure behind.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →