CKS Minimize Microservice Vulnerabilities Practice Question
Which kubectl command lists all MutatingWebhookConfigurations in the cluster?
⚠ Common exam trap
The trap here is that candidates may guess a generic or intuitive command like `kubectl get webhooks` or `kubectl get mutating-webhooks`, but the CKS exam expects exact knowledge of the Kubernetes API resource name `mutatingwebhookconfigurations` (no hyphens, no shorthand).
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
✓
kubectl get mutatingwebhookconfigurations
`kubectl get mutatingwebhookconfigurations` is the standard Kubernetes command to list all MutatingWebhookConfiguration resources. These resources are part of the admission webhook mechanism, which intercepts API requests to mutate objects before they are persisted. The resource name is case-sensitive and must match the exact API resource name `mutatingwebhookconfigurations` (or the short form `mutatingwebhookconfiguration`).
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
kubectl get webhooks
Why it's wrong here
There is no Kubernetes API resource type named 'webhooks' in any API group. The admissionregistration.k8s.io group defines `mutatingwebhookconfigurations` and `validatingwebhookconfigurations` as the cluster-scoped resources for admission webhooks. Running `kubectl get webhooks` returns an error from the API server indicating that the server could not find the requested resource. To list admission webhooks, you must use the exact plural resource name, e.g., `mutatingwebhookconfigurations`.
- ✗
kubectl list webhooks
Why it's wrong here
The kubectl CLI does not have a generic `list` subcommand; the correct verb for retrieving resources is `get` (e.g., `kubectl get <resource>`). Additionally, even if `list` were valid, the noun `webhooks` is not a recognized Kubernetes resource type, so the command would fail on both the verb and the resource name. The supported command uses the `get` verb and the canonical resource name, such as `kubectl get mutatingwebhookconfigurations`.
- ✓
kubectl get mutatingwebhookconfigurations
Why this is correct
The correct resource is `mutatingwebhookconfigurations` (plural form of MutatingWebhookConfiguration) from the `admissionregistration.k8s.io/v1` API group. `kubectl get mutatingwebhookconfigurations` queries the API server for all cluster-scoped mutating admission webhook configurations, which intercept resource requests to modify objects before they are persisted. This command will return a list of the configured webhooks, or an empty list if none exist. The singular form `kubectl get mutatingwebhookconfiguration` is also accepted, but the plural form is the canonical resource name.
- ✗
kubectl get mutating-webhooks
Why it's wrong here
The Kubernetes API resource name is not hyphenated; it is a single lowercase word spelled `mutatingwebhookconfigurations`. The API server recognizes resource types as lowercase plural nouns without punctuation, so `mutating-webhooks` is neither a valid resource nor a partial abbreviation. This command would fail with an error like `the server doesn't have a resource type "mutating-webhooks"`. Always refer to the exact resource names returned by `kubectl api-resources`.
Go deeper
Related to this question
About these practice questions
Courseiva writes every CKS question from scratch — 845 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.