Kyverno
Medium
Policies
Which of the following is a valid way to exclude system namespaces in a Kyverno policy?
Select your answer:
Show answer and explanation
Answer: exclude: { namespaces: [kube-system, kube-public] }
Explanation
The correct syntax to exclude system namespaces in a Kyverno policy is 'exclude: { namespaces: [kube-system, kube-public] }'. This excludes resources in the kube-system and kube-public namespaces from being subject to the policy.
More medium Kyverno questions
- What is the purpose of the 'match.resources.selector' field in a Kyverno policy?
- What is the purpose of the 'kyverno.io/ignore' annotation?
- Which of the following is a valid way to use a variable in a Kyverno policy pattern?
- What is the purpose of the 'kyverno.io/generated-by' annotation?
- In a kyverno-test.yaml results entry, which field marks the result as coming from a CEL-based ValidatingPolicy?
- What happens when a resource violates a Kyverno validation policy with 'validationFailureAction' set to 'enforce'?