Challenge - 5 Problems
Pod Security Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
Understanding Pod Security Standards Levels
Which of the following best describes the restricted Pod Security Standard level in Kubernetes?
Attempts:
2 left
💡 Hint
Think about the strictest security level that blocks privileged access.
✗ Incorrect
The restricted level enforces the highest security by disallowing privileged containers and host namespaces, ensuring minimal risk.
💻 Command Output
intermediate1:00remaining
Output of Applying a Pod Security Admission Label
What is the output when you run the following command to label a namespace for the baseline Pod Security Standard enforcement?
kubectl label namespace dev pod-security.kubernetes.io/enforce=baseline
Attempts:
2 left
💡 Hint
Check if the namespace exists before labeling.
✗ Incorrect
If the namespace 'dev' exists, the command labels it and outputs 'namespace/dev labeled'.
❓ Configuration
advanced2:00remaining
Correct Pod Security Admission Configuration in Namespace YAML
Which snippet correctly configures a namespace YAML manifest to enforce the restricted Pod Security Standard at the
enforce level?Attempts:
2 left
💡 Hint
Pod Security Admission uses labels, not annotations, for enforcement.
✗ Incorrect
The correct way is to use the label 'pod-security.kubernetes.io/enforce' with the value 'restricted' under metadata.labels.
❓ Troubleshoot
advanced2:00remaining
Troubleshooting Pod Creation Failure Due to Pod Security Admission
A developer tries to create a pod in a namespace labeled with
pod-security.kubernetes.io/enforce=restricted but gets an error. Which of the following pod specs is most likely causing the failure?Kubernetes
apiVersion: v1
kind: Pod
metadata:
name: test-pod
spec:
containers:
- name: app
image: nginx
securityContext:
privileged: trueAttempts:
2 left
💡 Hint
Restricted policy blocks privileged containers.
✗ Incorrect
The restricted Pod Security Standard disallows privileged containers, so setting privileged: true causes rejection.
✅ Best Practice
expert2:30remaining
Best Practice for Gradual Pod Security Standard Adoption
You want to gradually enforce Pod Security Standards in a large cluster without breaking existing workloads immediately. Which approach is best?
Attempts:
2 left
💡 Hint
Start by warning to identify issues before blocking pods.
✗ Incorrect
Using the warn label allows you to see policy violations without blocking pod creation, enabling gradual adoption.