Kcna Kubernetes And Cloud Native Associate · Free Practice Question Medium
Question 39
Your organization has strict security policies. You need to ensure that no container in any pod can use Linux capabilities like making network connections as root. Which Kubernetes features should you use? (Select two)
-
A
Node Affinity Rules
-
B
Role-Based Access Control (RBAC)
-
C
PodSecurityPolicy
-
D
Security Context
-
E
NetworkPolicy
Reveal correct answers
Correct answers: C, D
A.
Node affinity rules affect where a pod can be scheduled but do not impose any security constraints within the containers.
B.
RBAC controls access to Kubernetes API resources but doesn't restrict capabilities within containers.
C.
PodSecurityPolicy can enforce security configurations cluster-wide, including preventing containers from running as root or using certain Linux capabilities.
D.
Security Context allows you to set security parameters on a Pod or Container level. You can drop specific Linux capabilities or run the container as a non-root user to meet your requirements.
E.
NetworkPolicy controls the communication between Pods but doesn't restrict what operations a container can perform.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
