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.
More hard Kyverno questions
- What is the purpose of the 'context' field in a Kyverno policy?
- What is the purpose of the 'foreach' field in a Kyverno rule?
- Which of the following is NOT a component of the Kyverno architecture?
- What is the purpose of the 'kyverno.io/updateToken' annotation in a generated resource?
- Which of the following is NOT a valid source for context variables in Kyverno?
- What is the purpose of the 'kyverno.io/last-applied-policy' annotation?