Question 899 of 997
Supply Chain SecurityhardMultiple ChoiceObjective-mapped

Admission Controller Order: Why Mutating Webhooks Run Before Validating

This CKS practice question tests your understanding of supply chain security. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. A key principle to apply: admission controller ordering. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A cluster has both ImagePolicyWebhook and a mutating webhook that adds a sidecar. The admin notices that even when ImagePolicyWebhook rejects an image, the mutating webhook has already added the sidecar. What admission ordering issue is occurring?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Validating webhooks should run before mutating webhooks

Option A is correct. In Kubernetes, admission controllers are invoked in a fixed order: mutating admission controllers (including MutatingAdmissionWebhook) run before validating ones (including ImagePolicyWebhook and ValidatingAdmissionWebhook). Therefore, the mutating webhook that adds the sidecar runs before ImagePolicyWebhook validates the image. This means even if ImagePolicyWebhook rejects the image, the sidecar has already been added. The issue is that validating webhooks should run before mutating webhooks to prevent such problems, but the fixed order prevents this. Option B is wrong because using a validating webhook still runs after mutating webhooks. Option C is a workaround but not related to the ordering issue. Option D is incorrect because you cannot change the order of built-in admission controllers; the order is fixed.

Key principle: Admission controller ordering

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Validating webhooks should run before mutating webhooks

    Why this is correct

    Correct. This describes the issue exactly: validating webhooks should run before mutating webhooks, but the fixed order causes them to run after, leading to the sidecar being added even when the image is rejected.

    Related concept

    Admission controller ordering

  • Use a validating webhook instead of ImagePolicyWebhook

    Why it's wrong here

    Wrong. Substituting ImagePolicyWebhook with a validating webhook does not change the order; mutating webhooks still run first.

  • The mutating webhook should be configured to skip pods with certain images

    Why it's wrong here

    Wrong. Configuring the mutating webhook to skip certain images is a potential workaround but does not address the fundamental ordering issue.

  • The ImagePolicyWebhook should be placed before the mutating webhook in the webhook configuration

    Why it's wrong here

    Wrong. In Kubernetes, the order of admission controllers is fixed: mutating controllers run before validating ones. You cannot reorder ImagePolicyWebhook before the mutating webhook in the plugin chain.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap is that candidates think they can reorder admission controllers, but Kubernetes enforces a fixed order: mutating runs before validating. Therefore, placing a validating controller before a mutating one is not possible.

Detailed technical explanation

How to think about this question

Kubernetes admission webhooks are invoked in two phases: mutating webhooks (which can modify objects) run first, followed by validating webhooks (which can only reject). The ImagePolicyWebhook is a validating webhook, so it runs after the mutating webhook that adds the sidecar. To enforce image policy before mutation, you would need to use a mutating webhook that performs the image check and rejects the request before the sidecar is added, or reorder the webhooks using the 'matchConditions' or 'objectSelector' fields, but the standard ordering is fixed by the API server.

KKey Concepts to Remember

  • Admission controller ordering
  • ImagePolicyWebhook
  • MutatingAdmissionWebhook

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Admission controller ordering

Real-world example

How this comes up in practice

A practitioner preparing for the CKS exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Admission controller ordering Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Review admission controller ordering, then practise related CKS questions on the same topic to reinforce the concept.

Related practice questions

Related CKS practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free CKS practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this CKS question test?

Supply Chain Security — This question tests Supply Chain Security — Admission controller ordering.

What is the correct answer to this question?

The correct answer is: Validating webhooks should run before mutating webhooks — Option A is correct. In Kubernetes, admission controllers are invoked in a fixed order: mutating admission controllers (including MutatingAdmissionWebhook) run before validating ones (including ImagePolicyWebhook and ValidatingAdmissionWebhook). Therefore, the mutating webhook that adds the sidecar runs before ImagePolicyWebhook validates the image. This means even if ImagePolicyWebhook rejects the image, the sidecar has already been added. The issue is that validating webhooks should run before mutating webhooks to prevent such problems, but the fixed order prevents this. Option B is wrong because using a validating webhook still runs after mutating webhooks. Option C is a workaround but not related to the ordering issue. Option D is incorrect because you cannot change the order of built-in admission controllers; the order is fixed.

What should I do if I get this CKS question wrong?

Review admission controller ordering, then practise related CKS questions on the same topic to reinforce the concept.

What is the key concept behind this question?

Admission controller ordering

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more ways this is tested on CKS

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Which THREE of the following are correct statements about Kubernetes admission controllers in the context of supply chain security? (Select 3)

hard
  • A.Admission controllers are executed in a specific order that can affect the final state of the resource
  • B.ValidatingAdmissionWebhook can be used to enforce policies like requiring all images to be signed
  • C.MutatingAdmissionWebhook can only modify pods, not other resources
  • D.ImagePolicyWebhook is used to validate container images against an external policy
  • E.OPA/Gatekeeper uses MutatingAdmissionWebhook to enforce policies

Why A: Admission controllers are executed in a specific order: mutating controllers run first, then validating controllers. This ordering is critical because a mutating webhook can modify the resource before a validating webhook evaluates it, potentially bypassing intended policies if the order is not carefully managed. The Kubernetes API server processes admission controllers sequentially based on the order defined in the API server flags or the built-in chain, which directly affects the final resource state.

Keep practising

More CKS practice questions

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This CKS practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKS exam.