k8wiz
Kyverno
Easy
Validation

Which validationActions value makes a Kyverno ValidatingPolicy reject a request that fails a validation?

Select your answer:

Show answer and explanation

Answer: Deny

Explanation

ValidatingPolicy accepts Deny, Audit and Warn in spec.validationActions, the same values as a Kubernetes ValidatingAdmissionPolicy binding. Deny blocks the request, Audit only records the result in policy reports and Warn returns a warning to the client. Enforce is the old validationFailureAction value from ClusterPolicy and is not valid here.

Read more about Kyverno