Kyverno
Medium
Policies
What is the purpose of the 'match.resources.selector' field in a Kyverno policy?
Select your answer:
Show answer and explanation
Answer: To select which Kubernetes resources the policy applies to based on labels
Explanation
The 'match.resources.selector' field in a Kyverno policy is used to select which Kubernetes resources the policy applies to based on their labels. This allows for fine-grained control over which resources are subject to the policy.
More medium Kyverno questions
- 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?
- The Kyverno 1.20 Helm chart refuses to upgrade because legacy kyverno.io policies exist. Which value lets the upgrade proceed?
- A GeneratingPolicy that clones a Secret into new namespaces fails with a forbidden error. Which label on a ClusterRole merges its rules into the Kyverno background controller's permissions?