KCNA · Question #154
Which of the following is a recommended security habit in Kubernetes?
The correct answer is B. Disallow privilege escalation from within a container as the default option. Disallowing privilege escalation by default is a Kubernetes security best practice. Privilege escalation allows a process inside a container to gain more privileges than its parent process, which attackers can exploit to break out of container isolation. Options A and C…
Question
Which of the following is a recommended security habit in Kubernetes?
Options
- ARun the containers as the user with group ID 0 (root) and any user ID.
- BDisallow privilege escalation from within a container as the default option.
- CRun the containers as the user with user ID 0 (root) and any group ID.
- DAllow privilege escalation from within a container as the default option.
How the community answered
(61 responses)- A3% (2)
- B89% (54)
- C7% (4)
- D2% (1)
Explanation
Disallowing privilege escalation by default is a Kubernetes security best practice. Privilege escalation allows a process inside a container to gain more privileges than its parent process, which attackers can exploit to break out of container isolation. Options A and C advocate running containers as root (UID 0 or GID 0), which exposes the host system if a container is compromised. Option D explicitly allows privilege escalation, which is the direct opposite of a secure posture. Setting allowPrivilegeEscalation: false in the Pod security context enforces this restriction.
Topics
Community Discussion
No community discussion yet for this question.