Kubernetes and Cloud Native Associate (KCNA) — Question 139
Which of the following is a recommended security habit in Kubernetes?
Answer options
- A. Run the containers as the user with group ID 0 (root) and any user ID.
- B. Disallow privilege escalation from within a container as the default option.
- C. Run the containers as the user with user ID 0 (root) and any group ID.
- D. Allow privilege escalation from within a container as the default option.
Correct answer: B
Explanation
The correct answer, B, is crucial for maintaining security by preventing unauthorized privilege escalation within containers. Options A and C suggest running containers as the root user, which increases the risk of security vulnerabilities. Option D is also a bad practice as it allows privilege escalation, further compromising the security of the Kubernetes environment.