Bird
0
0

After labeling a namespace with pod-security.kubernetes.io/enforce=restricted, pods with privileged containers are still accepted. What is the most probable reason?

medium📝 Troubleshoot Q6 of 15
Kubernetes - RBAC and Security
After labeling a namespace with pod-security.kubernetes.io/enforce=restricted, pods with privileged containers are still accepted. What is the most probable reason?
AThe Pod Security Admission Controller is not enabled or configured properly in the API server
BThe namespace label syntax is incorrect and ignored by the controller
CPrivileged containers are allowed by default in the restricted profile
DPod Security Admission Controller only warns and does not enforce policies
Step-by-Step Solution
Solution:
  1. Step 1: Verify controller activation

    Pod Security Admission Controller must be enabled in the API server flags.
  2. Step 2: Understand enforcement

    Without the controller enabled, labels have no effect.
  3. Step 3: Check label correctness

    The label syntax is correct, and restricted profile disallows privileged containers.
  4. Final Answer:

    The Pod Security Admission Controller is not enabled or configured properly in the API server -> Option A
  5. Quick Check:

    Controller must be active for enforcement [OK]
Quick Trick: Controller must be enabled for enforcement to work [OK]
Common Mistakes:
  • Assuming labels alone enforce policies
  • Believing restricted profile allows privileged containers
  • Confusing warn mode with enforce mode

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes