KCA Practice Questions
Twenty-five single-best-answer questions, built the way the real KCA builds them: one stem, four options, exactly one option that answers this stem better than the other three. They are split across all six domains from the KCA blueprint in rough proportion to their weight — eight on Writing Policies alone, since it is nearly a third of the real paper, down to two on Policy Management — so a strong or weak score in one section tells you something real about where your marks would actually land. This page is untimed and open-book on purpose: work through it slowly, read every explanation even for questions you got right, and only once these twenty-five stop surprising you should you move on to the two full, weighted, timed papers — Mock Exam · Set 1 and Mock Exam · Set 2.
Remember the robot at the door checking every backpack against the poster of rules? This page is flashcards for being the robot's supervisor. Each question describes one backpack and asks which rule applies, or what the robot should do next — and it gives you four possible answers. One is exactly right. One is right about a different poster rule. One uses a word like "always" or "never," which real rule-posters almost never use because real life has exceptions. And one is just made up — a rule that sounds official but was never actually on the poster. Getting fast at telling those four apart is most of what passing this exam actually means.
How this bank is built
☺ Like you're 10: The biggest pile of questions covers the biggest part of the real test — almost a third of everything is one single domain.
The KCA curriculum weights its six domains 32 / 18 / 18 / 12 / 10 / 10, and this bank mirrors that shape rather than splitting twenty-five questions evenly into small equal piles. Writing Policies gets eight questions on its own — nearly a third of this bank, matching nearly a third of the real exam — because it carries eleven separate named competencies and is, by a wide margin, where the marks are. The two 18% domains, Fundamentals and Installation/Config/Upgrades, split the next largest share; the operational one gets slightly more questions here on purpose, because it is the domain people underestimate for being "boring," and underestimating it on exam day costs real marks.
| Domain | Blueprint weight | Questions here | Numbers |
|---|---|---|---|
| 🐢 Writing Policies | 32% | 8 | Q1–Q8 |
| 🦉 Fundamentals of Kyverno | 18% | 4 | Q9–Q12 |
| 🦫 Installation, Configuration & Upgrades | 18% | 5 | Q13–Q17 |
| 🐿️ Kyverno CLI | 12% | 3 | Q18–Q20 |
| 🤖 Applying Policies | 10% | 3 | Q21–Q23 |
| 🐘 Policy Management | 10% | 2 | Q24–Q25 |
| Total | 25 | Q1–Q25 | |
Every question below asks for the single best answer, not the only true sentence in the list. On several of these, two options are individually defensible — that's deliberate. Read the exact question being asked before you look at the options, form your own answer from what you know of how Kyverno actually behaves, then compare it to what's on offer. If your answer isn't there, you've likely misread the question rather than found a flaw in it.
Writing Policies — 8 questions
☺ Like you're 10: Four kinds of rule — say no, quietly fix it, make a new thing, check the seal on the box — plus the small print around all four that the exam loves to test.
Thirty-two percent of the real exam is this one domain, and it carries eleven named competencies on its own — more than the next two domains combined. See the KCA blueprint for the full reference on validate, mutate, generate and verifyImages; these eight questions probe the edges of each, plus preconditions, background scans, autogen and cleanup policies.
Q1. A validate rule with a correct pattern block shows up as fail for dozens of resources in kubectl get polr -A -o wide, yet nothing is ever actually rejected at admission time. What is missing?
- A.
failureAction: Enforceon the rule (or the older policy-levelspec.validationFailureAction: enforce) — without it, the rule audits and reports, but never blocks. - B.
background: trueon the rule. - C. The
patternmust never use a wildcard like?*— replace it with an explicit regex to force enforcement. - D.
spec.enforceMode: strictat theClusterPolicylevel.
Show answer & explanation
Answer: A. B is a true statement about a different setting entirely: background: true controls whether existing resources get scanned, not whether admission is blocked for new ones — a rule can be enforced with background scanning off, or audited with it on. C is a fabrication dressed as exam trivia; wildcard patterns have nothing to do with enforce-versus-audit behavior. D invents a field that doesn't exist. failureAction: Enforce is the one switch that turns a report into a rejection — everything else here is a distractor built from a real, unrelated Kyverno concept.
Q2. A validate rule should only run when request.object.spec.replicas is greater than 1 — a condition on the incoming resource's own field value, not on its kind, namespace, name, or labels. Which construct expresses this?
- A.
preconditions— a JMESPath-based conditional block, evaluated before the rule's main action runs, built exactly for value-based conditions thatmatch/excludecannot express. - B.
match.any[].resources.selector, a label selector. - C. This cannot be expressed — write two separate policies, one for
replicas: 1and one for anything higher. - D.
spec.rules[].filter: replicas>1.
Show answer & explanation
Answer: A. B names a real filtering mechanism, but a label selector only reads metadata.labels — it has no way to inspect a live spec field like a replica count. C is an absolute-language fabrication: Kyverno is built precisely so this kind of conditional logic doesn't need duplicated policies. D invents a field; there is no filter key at that location in the schema. preconditions is the named competency exactly because match and exclude only reason about resource identity — kind, namespace, name, labels, subjects, operations — while a live field comparison needs the conditional block.
Q3. A validate rule checks request.userInfo.username to restrict who may create Secrets in a namespace, and the team sets background: true so existing Secrets get audited too. What happens when the background controller scans a Secret that was created last month?
- A. The rule replays the original AdmissionReview exactly, including the original requester's identity, so the check runs identically to admission time.
- B. The check cannot evaluate meaningfully —
request.userInfoand other admission-only context are not available outside a live admission request, so a rule depending on who made the request cannot run correctly in the background. - C. Background scans only ever run once, at policy install time, and never again after that.
- D. The rule is automatically rewritten to check
metadata.annotationsinstead.
Show answer & explanation
Answer: B. A fabricates a replay mechanism that doesn't exist — the background controller does not carry the original requester's identity forward. C is false; the background controller re-scans on its own resync interval, not just once. D invents an automatic rewrite Kyverno never performs. The real, testable fact here is that request.userInfo, request.operation and similar admission-only fields simply aren't populated during a background scan — which is exactly why identity-dependent rules are a poor fit for background: true, independent of how the rest of the rule is written.
"Q3 is a mistake I've watched three different teams make. Someone writes a beautiful validate rule keyed on request.userInfo, turns on background scanning so it also covers the fleet that predates the policy, and then can't figure out why the background scan results look wrong or empty for that rule. The fix isn't a bug report — it's realizing the background controller was never handed that context to begin with. Admission-only fields stay admission-only."
Q4. A mutate rule must insert imagePullPolicy: IfNotPresent as an explicit, reviewable RFC 6902 operation rather than a merged object shape:
mutate:
patchesJson6902: |-
- op: add
path: "/spec/containers/0/imagePullPolicy"
value: IfNotPresentWhich mutate strategy is this, and why is it the right pick given the "explicit sequence of operations" requirement?
- A.
patchesJson6902— RFC 6902 JSON Patch, with explicitop/path/valueentries; the named "JSON Patches" competency, and the right tool when the change needs to read as a precise, ordered sequence of operations. - B.
patchStrategicMerge, since it is the only mutate mechanism Kyverno supports. - C.
generatemust be used instead, becausemutatecan only ever change labels and annotations. - D.
spec.rules[].patch: json-merge, Kyverno's own merge dialect.
Show answer & explanation
Answer: A. B is wrong twice over: patchStrategicMerge is real and valid, but it expresses a partial object to merge using Kubernetes strategic-merge semantics, not an explicit op-by-op sequence — and it is not the "only" mechanism, which is the absolute-language tell. C fabricates a restriction; mutate can touch any field, including container specs, exactly as shown. D invents a field name that isn't part of the schema. The stem's own snippet already is the answer — recognizing patchesJson6902 on sight is most of this competency.
Q5. A generate rule creates a default NetworkPolicy in every new Namespace. The platform team wants the generated object kept in ongoing sync with its source: if someone hand-edits the generated NetworkPolicy, Kyverno should revert it, and if the source template later changes, existing copies should update too. Which setting delivers this?
- A.
synchronize: trueon the generate rule — ties the generated resource's state to its source (dataorclone) on an ongoing basis, reverting drift and propagating template updates. - B.
background: trueon the rule. - C. Generation only ever supports
clone, copying an existing object — inlinedatais not a real option. - D.
mode: mirrorundergenerate, a field that mirrors manual edits back into the source Namespace.
Show answer & explanation
Answer: A. B is true for an unrelated reason — background: true lets a generate rule catch Namespaces that already existed before the policy was installed, but it says nothing about keeping an already-generated object in sync afterward. C is an absolute-language fabrication: generate genuinely supports both data (inline) and clone (copy a source object), so "only ever" is false on its face. D invents a field name. synchronize: true is the specific, named switch for exactly the ongoing-sync behavior the stem describes.
Q6. A verifyImages rule uses a keyless attestor (Sigstore Fulcio/Rekor via OIDC) and sets mutateDigest: true. A Pod references ghcr.io/acme/api:v2.3. After verification succeeds, what happens to the image reference before it is persisted?
- A. Kyverno rewrites the tag to the resolved content digest (
ghcr.io/acme/api@sha256:...), closing the tag-mutation race — which is exactly whyverifyImagesruns in Kyverno's mutating admission phase, even though its job is verification. - B. The tag is left untouched; only a PolicyReport entry records the digest.
- C.
verifyImagesonly supports static, pre-shared public keys — keyless Fulcio verification is not supported. - D. The Pod is deleted and recreated under a new UID once verification completes.
Show answer & explanation
Answer: A. B is the tempting one, since a report entry is also written — but it misses the live mutation the stem specifically asks about, and misses the point of setting mutateDigest: true at all. C is false and reversed: keyless verification via Fulcio/Rekor is a first-class, explicitly supported attestor type. D invents disruptive behavior with no basis in how admission mutation works. This is the exam's favorite subtlety about verifyImages: a control whose job is verification runs in the mutating phase, because a successful check rewrites the reference it just checked.
Q7. A rule's match block lists only kind: Pod. The team deploys exclusively via Deployment, never bare Pods — yet violation messages still appear correctly against failed Deployments. What explains this, and how would the team scope it to skip one specific controller kind?
- A. Autogen — Kyverno automatically derives equivalent rules for Pod-controller kinds (Deployment, StatefulSet, DaemonSet, Job, CronJob) from a Pod-matching rule; scope or disable it per policy with the
pod-policies.kyverno.io/autogen-controllersannotation. - B.
background: truesilently rewrites thematchblock to include every Pod-controller kind. - C. Kyverno always evaluates every rule against every possible kind, regardless of what
matchspecifies. - D. The cluster's admission webhook redirects all Deployment requests through a hidden Pod proxy object.
Show answer & explanation
Answer: A. B misattributes autogen's job to background, which has nothing to do with generating additional rule copies for other kinds. C is an absolute-language fabrication directly contradicted by the fact that a match block is required at all. D invents an admission-layer proxy mechanism with no basis in how Kubernetes or Kyverno webhooks work. Autogen exists specifically so a rule written once, against Pod, surfaces its message where a human developer actually looks — on the Deployment they tried to create.
Q8. A team wants matching resources deleted automatically on a recurring schedule — for example, purging completed Jobs older than 24 hours — without writing a validate, mutate, generate, or verifyImages rule. What is the correct construct, and how does it relate to the four rule types?
- A. A
ClusterCleanupPolicy(or namespacedCleanupPolicy) — a separate CRD served by its own cleanup controller, with its ownschedule,matchandconditions; it is not a fifth rule type nested insidespec.rules[], it is a standalone resource kind. - B. Add a fifth entry under
spec.rules[]calledcleanup, alongsidevalidate,mutate,generate, andverifyImages. - C. Only
generatecan ever delete resources, via a negativesynchronizevalue. - D.
validate.cel.deleteOnFail: true, inside a CEL-based validate rule.
Show answer & explanation
Answer: A. B misattributes cleanup as one of the four in-rule actions, when it is architecturally separate — its own CRD and controller, not a fifth key inside a rule. C invents a mechanism; generate creates companion resources, it does not delete anything, and synchronize has no "negative" mode. D fabricates a field; Common Expression Language (CEL) is real, and is a genuine alternative to the JMESPath-style pattern block inside validate — the same language the API server itself uses natively for ValidatingAdmissionPolicy — but it does not delete resources on failure. Cleanup policies are the one item on this domain's competency list that isn't a rule type at all.
On a throwaway kind cluster, write a ClusterCleanupPolicy that deletes completed Jobs older than 24 hours on an hourly schedule, next to the require-team-label validate rule and the default-deny-per-namespace generate rule from the blueprint. Apply all three with Helm, then watch three completely different mechanisms at work in one cluster: an admission-time block, a background-eligible ongoing check, and a scheduled deletion that has nothing to do with admission at all. Writing all three side by side is the fastest way to stop mixing up which competency owns which behavior.
Fundamentals of Kyverno — 4 questions
☺ Like you're 10: The words everyone assumes they already know — but the exam checks the exact edge, like which kind of "policy" can and can't see a whole Namespace.
Eighteen percent, conceptual and cheap to secure if you read closely: ClusterPolicy versus Policy, how the admission webhook actually intercepts a request, and what a signature or attestation on an OCI image really proves.
Q9. A team wants one rule that blocks any Namespace lacking a cost-center label, cluster-wide. Which policy kind must they use, and why would a namespaced Policy fail here?
- A.
ClusterPolicy— the only Kyverno policy kind that can match cluster-scoped resources such asNamespace; a namespacedPolicyshares the identical schema but is confined to matching resources inside its own namespace, and aNamespaceobject is itself cluster-scoped. - B.
Policy, becausePolicyobjects are evaluated beforeClusterPolicyobjects and take precedence for namespace-scoped concerns. - C. Either kind works identically — they differ only in name, not capability.
- D. Neither — Namespace governance requires a separate CRD called
NamespacePolicy.
Show answer & explanation
Answer: A. B invents an evaluation-order rule with no basis, and still misses the actual scope limitation. C is an absolute-language fabrication directly contradicted by the scope difference the stem depends on. D invents a CRD that doesn't exist. Policy and ClusterPolicy genuinely share an identical rule schema — the only difference the exam cares about is scope, and cluster-scoped resources are exactly where that difference bites.
Q10. A cluster has exactly one Kyverno policy installed, matching only kind: Pod. What happens to a request to create a ConfigMap?
- A. The request never reaches Kyverno's admission webhook at all — Kyverno dynamically configures its own webhook rules to cover only the kinds referenced by currently installed policies, so unrelated kinds add zero admission latency.
- B. The request is sent to Kyverno, which returns an empty PolicyReport entry for it.
- C. Kyverno's webhook always intercepts every resource kind in the cluster, regardless of what policies are installed, purely for auditing.
- D. The request is queued and only processed once a matching policy is installed, causing the create to hang.
Show answer & explanation
Answer: A. B sounds cautious and plausible but is wrong about the mechanism — if a kind isn't covered by any installed policy, Kyverno's webhook isn't invoked for it at all, so there's no report entry generated from that request in the first place. C is an absolute-language fabrication contradicted by the dynamic-configuration behavior itself. D invents disruptive queuing with no basis. The "Admission Controllers" competency is precisely this: Kyverno keeps its own webhook scope in sync with what's actually installed, rather than intercepting everything by default.
Q11. A submitted ClusterPolicy rule contains only a validate block — no match block at all. What happens when this is applied?
- A. It is rejected as invalid — every rule requires a
matchblock to identify which resources it applies to;validate/mutate/generate/verifyImagesdescribe what to do,match(and optionallyexclude) describes to what. - B. It applies to every resource kind in the cluster by default, since no
matchblock means "match everything." - C. It is silently ignored forever, with no error, log line, or report.
- D. Kyverno automatically infers the
matchblock from the structure of thevalidatepattern.
Show answer & explanation
Answer: A. B invents a "match everything" default that doesn't exist in the schema. C is an absolute-language fabrication — a malformed policy surfaces as invalid rather than vanishing without a trace. D invents an inference feature Kyverno doesn't have. This is a YAML-manifest-shape question at its core: a rule is what plus to what, and one half missing makes the whole rule invalid, not universally scoped.
Q12. What does a valid attestation checked by verifyImages actually prove, as distinct from a bare signature?
- A. A signature proves who signed the image; an attestation is a signed statement of a fact about the image — for example, that it passed a specific SBOM scan, or was built by a specific CI pipeline — and a rule can require either, or both.
- B. That the image's OCI manifest media type is exactly
application/vnd.oci.image.manifest.v1+json. - C. A signature and an attestation are the same thing under a different name.
- D. That the image is stored specifically in Docker Hub — other OCI registries are unsupported.
Show answer & explanation
Answer: A. B is a real-sounding OCI detail that has nothing to do with what verifyImages actually checks. C is an absolute-language collapse of a distinction the stem itself draws — who signed it, versus what is claimed about it. D fabricates a registry restriction with no basis; verifyImages works against any OCI-compliant registry. The "OCI Images" competency is exactly this distinction: signature answers "who," attestation answers "what."
Installation, Configuration & Upgrades — 5 questions
☺ Like you're 10: The unglamorous domain — Helm values, which of four little robots does what, and reading the instructions before you upgrade anything.
Also 18%, but operational rather than conceptual: Helm as the named install method, the four deployments Kyverno typically runs as, RBAC for what the background controller is allowed to touch, the CRDs that back all of this, and upgrade discipline.
Q13. A cluster shows intermittent admission latency spikes during deploys, but background policy scans and PolicyReport generation are unaffected. Which Kyverno deployment should be scaled first, and why?
- A. The admission controller — of Kyverno's typical four deployments (admission, background, reports, cleanup), only the admission controller sits directly in the live request path as a synchronous webhook; the other three operate asynchronously.
- B. The background controller — it re-evaluates every admission request in real time before allowing it through.
- C. All four deployments must always be scaled together in lockstep, or the installation becomes invalid.
- D. The reports controller, because PolicyReport generation is synchronous and blocks every admission request until the report is written.
Show answer & explanation
Answer: A. B misattributes the background controller's real job (periodic scanning of existing resources) to the live admission path it doesn't sit in. C fabricates a coupling requirement with no basis in how the Helm chart's replica counts work. D asserts a false synchronous coupling; report generation is deliberately decoupled from the blocking admission path. Knowing which of the four deployments is "the one in the request path" turns a confusing latency incident into a fast, correct diagnosis.
Q14. What is the officially documented method for installing and configuring Kyverno, and what does that imply about looking up "Controller Configuration with Flags" for a specific version?
- A. Helm — chart values (and therefore available controller flags) can move between chart versions, so the authoritative source for a given install is
helm show values kyverno/kyvernoagainst the chart version actually being deployed, not an old blog post or command history. - B.
kubectl apply -fagainst a single staticinstall.yaml, with flags hardcoded and unchangeable after install. - C. Kustomize is the only supported installation method; Helm charts are deprecated.
- D.
kyverno init, a bootstrap subcommand of the standalone CLI that installs the controllers directly.
Show answer & explanation
Answer: A. B describes a real, simpler pattern some other projects use, but not the one the KCA curriculum names as canonical here, and it directly contradicts the idea of versioned, configurable flags. C reverses the actual relationship — Helm is the named method, not deprecated. D invents a subcommand; the standalone kyverno CLI is for local policy testing (apply/test/jp), not cluster installation. Because chart values genuinely drift between versions, "read the chart's own values for the version you're deploying" is the one durable habit this question is really testing.
Q15. A generate rule creates a NetworkPolicy in every new Namespace via the background controller, but nothing is ever created, and the policy's own status shows no error. What is the most likely root cause to check first?
- A. The background controller's ServiceAccount lacks RBAC permission to create
NetworkPolicyobjects —generateand mutate-existing rules act through the background controller, which needs its own grant for whatever kind it creates or modifies. - B. The rule's
preconditionsare almost certainly malformed. - C.
generaterules never require any RBAC beyond what the admission controller already has, by design. - D. Kubernetes silently caps
generaterules at ten created resources per hour, cluster-wide.
Show answer & explanation
Answer: A. B is a plausible-sounding distractor, but the stem specifically flags "no error in the policy's own status" — a malformed precondition would typically surface a rule-logic symptom, whereas a missing RBAC grant is exactly the kind of quiet, out-of-band failure that leaves the policy status looking clean. C is an absolute-language fabrication contradicted by the curriculum naming RBAC as its own competency for precisely this reason. D invents a cluster-wide rate limit with no basis. A silent "nothing happened" from a generate rule is one of the most common real-world symptoms of a missing background-controller permission.
Q16. Which of the following is a genuine, distinct Kyverno CRD a platform engineer should expect to see in kubectl api-resources after a Helm install?
- A.
PolicyException(polex) — a real, separate CRD used to declaratively carve one named workload out of one policy's enforcement, reviewable through Git and code review rather than editing the policy itself. - B.
PolicyOverride— a CRD that globally disables one named policy for every namespace at once. - C. Kyverno has exactly one CRD,
ClusterPolicy; everything else — reports, exceptions, cleanup — is stored as ConfigMaps. - D.
KyvernoConfig— a required CRD that must be created manually before anyClusterPolicywill be accepted.
Show answer & explanation
Answer: A. B invents a CRD name; the real scoped-carve-out mechanism is PolicyException, not a global override object. C is an absolute-language fabrication — PolicyReport/ClusterPolicyReport, PolicyException and CleanupPolicy/ClusterCleanupPolicy are all genuine, separate CRDs, not ConfigMaps. D invents a required manual bootstrap step that contradicts how the Helm chart actually handles setup. Recognizing the real CRD family — policies, reports, exceptions, cleanup policies — on sight is squarely a Fundamentals-and-Installation crossover skill.
Q17. A team is two minor versions behind and wants to helm upgrade straight to the latest release in one step. What does the "Upgrading Kyverno" competency most directly warn them to check first?
- A. CRD handling on upgrade has varied across chart versions, and skipping minor versions risks missing an intermediate migration step — read the release notes for the specific target version, generally avoid skipping minor versions, and use
helm search repo kyverno/kyverno --versionsto see what's actually available rather than guessing. - B. Nothing — Helm upgrades are always fully backward- and forward-compatible across any version gap, by the nature of Helm itself.
- C. Only the reports controller needs to be upgraded; the other three deployments are version-independent.
- D. Downgrade to v1.0 first, then upgrade forward one version at a time — Kyverno requires a full version reset before any multi-version jump.
Show answer & explanation
Answer: A. B attributes a compatibility guarantee to Helm as a tool that Kyverno's own release process doesn't make — this is exactly the false comfort the competency exists to correct. C is a fabrication; all controller deployments ship together from the same chart version. D invents an oddly specific procedure with no documented basis. The honest, testable habit is boring on purpose: read the release notes for your actual target version before you upgrade.
On a kind cluster, helm install an older Kyverno chart version on purpose, apply the require-team-label policy from the blueprint, then run helm upgrade to the latest chart without reading anything first. Watch what actually happens to your policy and its CRDs. Then tear it down, reinstall clean, and this time read the release notes before upgrading. The difference between those two runs is the entire "Upgrading Kyverno" competency, felt once instead of memorized.
Kyverno CLI — 3 questions
☺ Like you're 10: Three little helper commands you can run on your own laptop, no cluster required, before anything you write ever touches a real one.
Twelve percent, and the best value on the paper — the curriculum names exactly three subcommands (apply, test, jp) plus installing the CLI itself. An afternoon of hands-on practice locks this domain in.
Q18. A platform engineer wants to know exactly what a new ClusterPolicy would do to a directory of manifests, offline, before merging anything:
kyverno apply ./policies/ --resource ./manifests/ --policy-report
What does this specific command do, and how does it differ from adding --cluster?
- A. It evaluates the policies against local manifest files entirely offline and renders the result as a PolicyReport-shaped summary;
--clusteris a separate flag that instead dry-runs the same policies against a live cluster's actual resources. - B. It applies every discovered policy directly to the live current
kubectlcontext. - C. This is impossible without a live cluster — Kyverno policies can only be evaluated by the in-cluster admission webhook.
- D. It is equivalent to
kyverno test, since both commands evaluate manifests against policies.
Show answer & explanation
Answer: A. B describes what --cluster would add, not the plain command shown — the whole point of the base command is that it never touches a live context. C is an absolute-language fabrication that defeats the entire purpose of a standalone CLI existing. D conflates two different subcommands: test specifically checks a policy's result against an expected outcome declared in a test file, while apply just reports what a policy would actually do to given resources, with no pre-declared expectation involved.
Q19. A repository keeps a kyverno-test.yaml beside each policy directory, several levels deep, each asserting expected pass/fail results per rule. What does kyverno test ., run from the repo root, actually do?
- A. It recursively discovers every
kyverno-test.yamlunder the working directory and runs each as a declarative unit test, comparing the policy's actual per-rule result against the declared expected result — the same discipline as a unit test suite, wired into CI to catch a regression before it reaches a cluster. - B. It applies every discovered policy directly to the live current
kubectlcontext. - C.
kyverno-test.yamlfiles must be named exactly that and placed only in the repository root — subdirectories are never scanned. - D. It automatically generates a
kyverno-test.yamlfile for any policy that doesn't already have one.
Show answer & explanation
Answer: A. B describes apply --cluster behavior, not test, which is explicitly cluster-independent. C is an absolute-language fabrication contradicted by the stem itself, which describes test files "several levels deep" being discovered correctly. D invents a generation feature; test runs existing declared expectations, it does not author them for you. Recognizing that test is about asserted expectations — not ad hoc "what would this do" exploration, which is apply's job — is the core distinction this competency checks.
Q20. A rule author is about to paste a JMESPath-style expression into a preconditions block and wants to confirm it returns what they expect first. Which subcommand is built exactly for this?
- A.
kyverno jp— for examplekyverno jp query -i pod.yaml 'spec.containers[*].image'evaluates the expression against a real manifest before it's live inside a rule, andkyverno jp functionlists Kyverno's own custom functions beyond the standard JMESPath spec. - B.
kyverno test, which will flag any malformed expression syntax as part of its normal output. - C. Expression syntax can only be validated by submitting the full policy to a live cluster and reading the resulting webhook error.
- D.
kyverno lint, a subcommand that statically type-checks expressions against the Kubernetes OpenAPI schema.
Show answer & explanation
Answer: A. B misattributes an expression-debugging job to test, which checks a policy's result against an expectation, not the validity of a standalone expression. C is an absolute-language fabrication that defeats the reason a local debugging subcommand exists at all. D invents a subcommand; the curriculum names exactly three — apply, test, jp — and "lint" is not one of them.
Applying Policies — 3 questions
☺ Like you're 10: Not writing the rule — pointing it at the right things, in the right way, once it's already written.
Ten percent: how match/exclude actually select resources, and the common settings — like background and the two forms of enforcement — that apply once a rule is already live in a cluster.
Q21. A policy must apply to Pods in any of three specific namespaces, and separately, only when the requesting user is not in the platform-admins group. Which statement correctly describes how to combine these two conditions?
- A. A
match.any[]list of namespace filters expresses "any of these three namespaces"; genuinely combining that with an unrelated condition on the requester's group needspreconditions, sincematch/excludeare structured around resource identity — kind, namespace, name, labels, subjects, operations — not arbitrary boolean logic over unrelated conditions. - B. Use only
exclude.all[]with the three namespaces listed —excludenever supportsanyas a keyword. - C.
matchcan only ever contain a single namespace per policy; three namespaces always requires three separateClusterPolicyobjects. - D. Namespace filtering requires a separate
NamespaceSelectorCRD applied before theClusterPolicy.
Show answer & explanation
Answer: A. B is an absolute-language fabrication — exclude, like match, genuinely supports both any and all for the same OR/AND semantics. C is also absolute and false; a match.any[] list naturally covers multiple namespaces in one rule. D invents a CRD that doesn't exist. This is exactly why "Resource Selection" and "Preconditions" are named as separate competencies: identity-shaped filtering lives in match/exclude, and everything else — like a requester's group membership — belongs in preconditions.
Q22. One rule in a policy file uses the newer, per-rule validate.failureAction: Enforce; another rule in the same file uses the older, policy-level spec.validationFailureAction: enforce. What should a platform engineer preparing for KCA understand about these two forms?
- A. Both are real, and the exam expects you to recognize both — the rule-level
failureActionis the current, more granular form, while the policy-levelvalidationFailureActionis the older, policy-wide form; a mixed-vintage policy repo needs both read correctly. - B. The rule-level form is deprecated in favor of the policy-level form.
- C. Only one of the two forms can ever appear anywhere in a cluster; mixing them across different policies breaks Kyverno entirely.
- D.
Enforceandenforce— capitalized versus lowercase — are functionally different settings with opposite behavior.
Show answer & explanation
Answer: A. B reverses the actual direction — the rule-level form is the current one, not the deprecated one. C is an absolute-language fabrication inventing a cross-policy incompatibility with no basis. D invents a case-sensitivity distinction; both spellings mean the same enforcement mode across the two field forms. "Common Policy Settings" is exactly this kind of small-print competency — knowing that older syntax still shows up in real repositories and reads correctly.
Q23. A require-team-label ClusterPolicy with background: true is installed into a cluster that already has 400 running Deployments, most missing the team label. What happens to those 400 versus a new Deployment created the next day?
- A. The 400 pre-existing Deployments are picked up by the background controller's periodic scan and show up as
failresults in PolicyReports, even though they were never touched by admission; the new Deployment is evaluated live, at admission time, by the same rule —background: trueextends coverage backward, it doesn't change how new resources are handled. - B. Only the new Deployment is ever evaluated;
background: truehas no effect on resources created before the policy existed. - C. All 400 pre-existing Deployments are immediately deleted, since they fail the policy.
- D. The 400 Deployments are automatically mutated in place to add a placeholder
teamlabel.
Show answer & explanation
Answer: A. B is precisely the misunderstanding background: true exists to correct — it's the reverse of the actual behavior. C is false; a validate rule blocks or reports, it does not delete non-compliant resources on its own. D conflates validate with mutate — nothing in the stem describes a mutate rule, and validate rules never rewrite resources. "Applying Policy in Cluster" is exactly this distinction between what happens to resources that predate a policy versus resources created after it.
Policy Management — 2 questions
☺ Like you're 10: The report card after the rules run — and the paperwork-approved way to make one exception without weakening the rule for everybody.
The smallest domain, at 10%, but it's how a fleet is actually governed day to day: PolicyReports for measurement, PolicyExceptions for reviewable carve-outs, and Kyverno's own Prometheus metrics for dashboards. See the blueprint for the full three-line CLI summary of this domain.
Q24. A platform engineer runs kubectl get polr -A -o wide and sees a mix of pass, fail, warn, skip, and error results. What does a skip result specifically indicate, as distinct from pass?
- A.
skipmeans the rule did not evaluate against that resource at all — typically because amatch/excludecondition or apreconditionscheck excluded it — whereaspassmeans the rule did evaluate and the resource satisfied it. Conflating the two hides real coverage gaps. - B.
skipmeans the resource passed, but only becausefailureActionwas set toAuditrather thanEnforce. - C.
skipandpassare simply two different labels for the identical outcome, kept for historical reasons. - D.
skiponly appears forverifyImagesrules, never forvalidateormutaterules.
Show answer & explanation
Answer: A. B misattributes the audit/enforce distinction — which affects what happens when a rule fails — to a result that means the rule never ran at all. C is an absolute-language fabrication directly contradicted by the coverage-gap consequence the stem describes. D invents a restriction; skip is a general PolicyReport result category, not tied to one rule type. A fleet full of skip results can look reassuring at a glance while actually meaning "this rule never even looked" — exactly the trap this question is built to catch.
Q25. A single payment-processing workload legitimately needs to run as root, but the disallow-privileged policy should stay strict for every other workload in the cluster. What is the reviewable, KCA-tested way to grant this one workload a carve-out?
- A. A
PolicyExceptionscoped to that specific workload and that specific policy/rule — a separate resource that lives in Git like anything else, so the exception is visible, auditable, and can later be time-bound or revoked, while the underlying policy stays strict for everyone else. - B. Edit the
disallow-privilegedClusterPolicydirectly and add anexcludeblock for that one workload's name. - C. There is no supported way to grant a single-workload exception in Kyverno; the policy must be disabled cluster-wide.
- D. Add
spec.rules[].bypass: [payment-svc]directly inside the rule.
Show answer & explanation
Answer: A. B names a real mechanism (exclude) but the wrong tool for this job — it permanently weakens the shared policy object itself, with no separate, reviewable trail, rather than creating a scoped, revocable exception record. C is an absolute-language fabrication; PolicyException exists specifically to avoid this outcome. D invents a field name; the real mechanism is the separate PolicyException CRD, not an inline rule field. This is the same "reviewable carve-out beats a permanent edit" principle that shows up across every policy-as-code system, made concrete as one named Kyverno CRD.
Scoring yourself, and what to do with a miss
☺ Like you're 10: Getting it wrong isn't the problem — not knowing why you got it wrong is. Every miss fits one of four boxes, and each box has its own fix.
Count your correct answers and divide by 25 for a rough percentage — this bank is too small to be a statistically precise rehearsal of the real paper, but it's plenty large enough to tell you whether a domain needs more reading before you attempt Mock Exam · Set 1.
The Linux Foundation's Multiple Choice Exam FAQ states that a score of 75% or higher is required to pass any Linux Foundation multiple-choice exam, KCA included, even though that figure isn't restated on the KCA product page itself — see the KCA blueprint for the full logistics table. This site is an independent, unofficial study resource, not affiliated with the CNCF or The Linux Foundation. Treat 75% here as a useful training target, but confirm the current pass mark, question count, and every other exam-day detail on the official Linux Foundation KCA page before you register or pay for anything.
When you miss one, resist the urge to just note the correct letter and move on — that teaches you almost nothing. File it instead:
| Bucket | Signature | The fix |
|---|---|---|
| Didn't know it | The explanation names a field, CRD, or behavior that's genuinely new to you | Content gap — reread the matching section of the blueprint, then add it to flashcards |
| Knew it, misread it | You wince reading the explanation because you actually knew this | Process gap — note which word you skipped (a negative, a qualifier), and underline lead-ins from now on |
| Confused two neighbors | You picked the mechanism next door — background for synchronize, exclude for PolicyException | Write a one-line discriminator for the pair and keep it somewhere you'll see it again |
| Guessed and got lucky, or unlucky | You can't explain why the other three options are wrong even though you picked correctly | Treat it exactly like a miss — a right answer you can't defend is a gap wearing a disguise |
Whichever domain produced the most misses, weigh that against its blueprint weight before deciding where to spend the next study session — a rough score in the 32%-weighted Writing Policies domain costs far more than the same rough score in the 10%-weighted Policy Management domain. The KCA study plan lays out exactly how to sequence reading, this bank, and the two mock exams across the days you have. If Kubernetes fundamentals themselves — CRDs, webhooks, RBAC — feel shaky underneath any of this, that's this course's own scope stopping short on purpose: see CKA in the sibling Kubernetes course first.
Remy: Twenty-five questions, ten minutes, twenty-two right. New record.
Timmy: Which three did you miss?
Remy: Q3, Q15, and Q23. Doesn't matter, eighty-eight percent is a great score!
Timmy: Q3 and Q23 are both Writing Policies and Applying Policies — the two heaviest chunks of the whole paper. That's not a rounding error, that's a real gap sitting in the most expensive part of the exam.
Nutty: And Q15 was RBAC — the "no error, nothing happens" failure mode. That one's worth memorizing on its own; it's the single most common real-world Kyverno bug report.
Gizmo: Eighty-eight's basically ninety, honestly. Go book the mock exam already, you've clearly got this. 😈
Timmy: Not until Remy can explain, out loud, why the background controller in Q3 couldn't see request.userInfo — not just which letter he picked.
Remy: …Fine. Give me the explanation panel back.
1. Why does this bank have eight Writing Policies questions but only two on Policy Management? 2. In Q3, why does background: true not rescue a rule that checks request.userInfo, and what admission-only context is missing from a background scan? 3. What's the difference between what Q1 (failureAction) and Q22 (the two forms of that same setting) are each testing? 4. Name the three distractor families the schematic on this page shows, besides the key itself. 5. What score should you treat as your training target, and where does that figure actually come from? 6. Give one example of a "confused two neighbors" miss from this bank, and its one-line discriminator. 7. What should you do with a question you got right but can't explain?
Check your answers
- Because the bank mirrors the KCA's own domain weights (32/18/18/12/10/10) rather than splitting evenly — Writing Policies is the single heaviest domain at 32%, nearly a third of the real paper, so it earns proportionally more practice.
- A background scan is not a live admission request, so admission-only context fields —
request.userInfo,request.operation, and similar — are simply not populated during it. A rule that depends on who made the request cannot evaluate that condition correctly outside admission time, no matter howbackgroundis configured. - Q1 tests whether you know that some form of
failureAction: Enforceis required at all for a rule to actually block. Q22 tests whether you can correctly read both the current, rule-level form and the older, policy-level form when they appear side by side in a real, mixed-vintage repository. - Swapped mechanism (true, but about the wrong rule type or controller), absolute language ("always," "never," "only"), and confident fabrication (an invented field, CRD, or subcommand that sounds official).
- 75%. It comes from the Linux Foundation's own Multiple Choice Exam FAQ, which applies to every LF multiple-choice exam including KCA — confirm it's still current on the official KCA page before you rely on it.
- Any pair from the bank works, for example:
background: truevs.synchronize: true—backgroundis about whether existing resources get scanned at all;synchronizeis about whether an already-generated resource stays tied to its source afterward. Different questions entirely. - Treat it exactly like a miss. Write out, in your own words, why each of the other three options is wrong — a right answer you can't defend is a gap you got lucky on, and it will not stay lucky under exam conditions.