k8wiz
Kyverno
Hard
Policies

A Kyverno DeletingPolicy matches ReplicaSets whose spec.replicas is 0. RBAC is in place, yet on a default Helm install nothing is ever deleted. Why?

Select your answer:

Show answer and explanation

Answer: The default resourceFilters in the Kyverno ConfigMap skip all ReplicaSets

Explanation

The cleanup controller checks every listed resource against resourceFilters and skips matches. The chart's default list includes [ReplicaSet,*,*], along with everything in kube-system, kube-public and kube-node-lease, so such a policy is silently inert until the filter is changed. DeletingPolicy can target any group, including apps, as long as the controller has RBAC for it.

Read more about Kyverno