k8wiz
Kyverno
Hard
Mutation

How does Kyverno change resources that already exist in the cluster, rather than only new admission requests?

Select your answer:

Show answer and explanation

Answer: A mutate rule with 'targets', run by the background controller

Explanation

Mutate-existing rules name the resources to change under 'targets'. A trigger event, or a policy event when mutateExistingOnPolicyUpdate is set on the rule, makes the background controller patch those targets. Kyverno needs RBAC permission to update those kinds, granted to the background controller's service account.