easyMultiple Choice
CKS Practice Question: Flags should be set to `false` to disable…
Which of the following flags should be set to `false` to disable anonymous authentication to the Kubernetes API server?
⚠ Common exam trap
CNCF often tests the exact flag name and syntax, so the trap here is confusing `--anonymous-auth` with non-existent flags like `--disable-anonymous` or `--enable-anonymous-auth`, or mixing up authentication with authorization flags like `--authorization-mode`.
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
✓
--anonymous-auth=false
Setting `--anonymous-auth=false` on the kube-apiserver disables anonymous requests. By default, anonymous authentication is enabled (set to `true`), allowing unauthenticated users to access the API server. Disabling it is a critical hardening step to prevent unauthorized access.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
--disable-anonymous=true
Why it's wrong here
--disable-anonymous=true is not a recognized kube-apiserver flag. The API server does not support a --disable-anonymous option; anonymous access is controlled by --anonymous-auth, which defaults to true. Passing this unknown flag would either be rejected at startup or silently ignored, meaning anonymous authentication remains enabled and the flag has no effect.
- ✗
--auth-mode=RBAC
Why it's wrong here
--auth-mode=RBAC is not a legitimate kube-apiserver flag. Authorization is configured via --authorization-mode, and authentication settings like anonymous access are separate. The --auth-mode flag does not exist; even if it did, RBAC is an authorization mechanism, not an authentication setting, so it would not disable anonymous login.
- ✓
--anonymous-auth=false
Why this is correct
--anonymous-auth=false is the correct flag to disable anonymous authentication in the Kubernetes API server. This boolean flag defaults to true, allowing unauthenticated requests to be associated with the `system:anonymous` user and `system:unauthenticated` group. Setting it to false causes requests without valid credentials to be rejected with a 401 Unauthorized before any authorization checks are performed.
- ✗
--enable-anonymous-auth=false
Why it's wrong here
--enable-anonymous-auth=false is not a valid kube-apiserver flag. The correct name is simply --anonymous-auth, without any --enable prefix. Using this non-existent flag would not be recognized by the API server, so anonymous authentication would remain unchanged and the kube-apiserver would continue accepting anonymous requests.
Go deeper
Related to this question
About these practice questions
This CKS question is part of Courseiva's 845-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.