CKS Minimize Microservice Vulnerabilities Practice Question
Which of the following is a valid way to drop all capabilities from a container?
⚠ Common exam trap
The CKS exam often tests the exact YAML syntax for capability management, and the trap here is that candidates confuse `drop` with `remove` or invent non-existent fields like `dropCapabilities`, leading them to pick incorrect options that look plausible but are syntactically invalid.
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
✓
securityContext: capabilities: drop: ["ALL"]
In Kubernetes, the `securityContext.capabilities.drop` field is used to explicitly remove Linux capabilities from a container. Dropping `ALL` removes every capability, ensuring the container runs with the least privilege possible, which is a key security best practice for minimizing microservice vulnerabilities.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
securityContext: dropCapabilities: true
Why it's wrong here
dropCapabilities is not a recognised securityContext field, so the manifest is rejected or the setting ignored. It is tempting because the name reads as a direct instruction, and a boolean toggle would be correct if the API exposed one for capability removal.
- ✗
securityContext: privileged: false
Why it's wrong here
privileged: false merely withholds privileged mode; it does not remove the default capability set, so capabilities remain. It is tempting because privileged containers are the extreme case, and this setting would be correct when preventing host device access rather than stripping capabilities.
- ✗
securityContext: capabilities: remove: ["ALL"]
Why it's wrong here
The field is capabilities.drop, not remove; Kubernetes expects drop: ["ALL"], so remove is invalid and no capabilities are dropped. It is tempting because remove describes the intent clearly, and a similarly named field would be correct if the schema used that verb.
- ✓
securityContext: capabilities: drop: ["ALL"]
Why this is correct
Placing capabilities.drop: ["ALL"] inside the container's securityContext instructs the container runtime to remove every Linux capability from the process. This is the documented Kubernetes mechanism for dropping all capabilities, applied per container rather than cluster-wide.
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.