# Which command is used to test a Kyverno policy against a resource without applying it to the cluster?

Kyverno, Easy (Beginner), CLI. https://k8wiz.com/uquiz/which-command-is-used-to-test-a-kyverno-policy-against-a-resource-without-applying-it-to-the-cluster

- A. kubectl validate -f policy.yaml
- B. kyverno apply policy.yaml resource.yaml --dry-run
- C. kyverno test policy.yaml resource.yaml
- D. kubectl test policy.yaml against resource.yaml

**Answer:** kyverno test policy.yaml resource.yaml

**Explanation:** The 'kyverno test' command is used to test a policy against a resource without applying it to the cluster. This is useful for policy development and testing.
