Finalizers for clean external cleanup
WHAT IT TESTS: pre-deletion hooks. OUTLINE: a finalizer is a key blocking deletion; deletion sets deletionTimestamp, the operator does cleanup then removes the finalizer so the object is purged.
WHAT IT TESTS: whether you can guarantee external cleanup before an object vanishes. ANSWER OUTLINE: a finalizer is a string in metadata.finalizers that prevents the API server from hard-deleting an object. When deleted, the object gets a deletionTimestamp but persists; reconcile sees the timestamp, performs external cleanup like deleting the cloud database, then removes its finalizer, letting the API server purge the object. Add the finalizer on first reconcile.
Read the original → interview
- #kubernetes
- #finalizers
- #operators
- #deletion
- #cleanup
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.