Correct. CEL inside Kyverno's `validate.cel.expressions` references `object` (the incoming resource) and asserts `runAsNonRoot == true` on `spec.securityContext`.
D`expression: "!object.runAsRoot"`
Incorrect. There is no `object.runAsRoot` field in PodSpec.
Writing Policies
Q3. Which resource type lets Kyverno automatically clean up Kubernetes resources on a TTL or schedule?
Reveal answer and explanations
A`ClusterPolicy` with `rules[].cleanup`
Incorrect. `rules[].cleanup` is not how cleanup is authored; it is a dedicated CRD.
B`CleanupPolicy` / `ClusterCleanupPolicy`
Correct. Kyverno ships `CleanupPolicy` (namespaced) and `ClusterCleanupPolicy` (cluster-scoped) for scheduled resource cleanup.
C`PolicyReport` with `cleanup: true`
Incorrect. `PolicyReport` is read-only evaluation data; it does not drive cleanup.
D`UpdateRequest` with `ttlSecondsAfterFinished`
Incorrect. `UpdateRequest` is an internal generate-rule helper, not a cleanup mechanism.
Writing Policies
Q4. Which statement about CEL support in Kyverno is most accurate?
Reveal answer and explanations
ACEL works under `validate.cel` and `preconditions`, with `object`/`oldObject`/`request` access, like K8s ValidatingAdmissionPolicy.
Correct. Kyverno exposes CEL under `validate.cel` (with `expressions`, `paramRef`, `auditAnnotations`) and `cel.preconditions`, consistent with upstream `ValidatingAdmissionPolicy` semantics.
BCEL is only usable in `generate` rules as of v1.11.
Incorrect. CEL is centered on validation, not generate.
CCEL replaces JMESPath entirely in current Kyverno versions.
Incorrect. JMESPath remains supported and is still the default for many rule types.
DCEL is a Kyverno fork of Rego and is unrelated to Kubernetes CEL.
Incorrect. It is the same CEL used in Kubernetes, not Rego.
Writing Policies
Q5. Which Kyverno construct applies a JSON Patch (RFC 6902) transformation inside a mutate rule?
Reveal answer and explanations
A`patchesJson6902`
Correct. Kyverno uses `patchesJson6902` as the field name for RFC 6902 JSON Patches inside mutate rules.
B`jsonPatch` field
Incorrect. `jsonPatch` is not the Kyverno field name; the field is `patchesJson6902`.
C`jsonMerge` field
Incorrect. `jsonMerge` is not a Kyverno field; strategic merge is under `patchStrategicMerge`.
Writing Policies accounts for 32% of the KCA exam. Expect questions that test recall of terminology and the ability to read short scenarios — not deep configuration. Use the sample questions above as difficulty calibration; if any feel hard, the rest of our 38-question domain bank will close those gaps.