k8wiz
Kyverno
Hard
Policies

Which label makes Kyverno delete a resource automatically after a set amount of time?

Select your answer:

Show answer and explanation

Answer: cleanup.kyverno.io/ttl

Explanation

Kyverno's cleanup controller watches resources with this label and deletes them when the time runs out, for example cleanup.kyverno.io/ttl: 2h. The controller needs RBAC permission to delete that kind. For rule-based deletion on a schedule, use a CleanupPolicy or ClusterCleanupPolicy instead.