Hacker News new | ask | show | jobs
by zzyzxd 555 days ago
For resources that are supposed to be cleaned up automatically, fixing your operator/finalizer is a better approach. Using this tool is just kicking the can down the road, which may cause even bigger problem.

If you have resources that need to be regularly created and deleted, I feel a cronjob running `kubectl delete -l <your-label-selector>` should be more than enough, and less risker than installing a 3rd party software with cluster wide list/delete permission.

3 comments

How should I discover the things that need deletion?

Presumably running some sort of analysis tool in a dry-run mode would help, no?

It appears to cover all that kor covers and more. I like the flexibility of cleaner. Both useful tools IMHO.
I think it can be useful as a discovery tool. How do you know that your operator is leaking resources in the first place? What if one of your cluster operators manually modified or created resources?
Most of the times you don't own the operator/finalizer

And most of the times, when it is a shared cluster, you don't even know what else is being deployed.