Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation CKS Exam - Topic 6 Question 87 Discussion

Posted by Valentin on Jan 05, 2026 at 05:16 AM

Create a PSP that will prevent the creation of privileged pods in the namespace.

Create a new PodSecurityPolicy named prevent-privileged-policy which prevents the creation of privileged pods.

Create a new ServiceAccount named psp-sa in the namespace default.

Create a new ClusterRole named prevent-role, which uses the newly created Pod Security Policy prevent-privileged-policy.

Create a new ClusterRoleBinding named prevent-role-binding, which binds the created ClusterRole prevent-role to the created SA psp-sa.

Also, Check the Configuration is working or not by trying to Create a Privileged pod, it should get failed.

Suggested Answer: A

Get Premium CKS Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
30 comments · newest first
LE
Leanora 4 months ago
If it fails, we know the policy works!
AL
Aliza 4 months ago
Testing with a privileged pod is smart.
TI
Timothy 4 months ago
Right, then the ServiceAccount and ClusterRole.
FR
Francene 6 months ago
I’d start with creating the PodSecurityPolicy first.
LE
Leanora 6 months ago
Yeah, preventing privileged pods is key for security.
AL
Aliza 6 months ago
I think the PSP part is crucial.
TI
Timothy 6 months ago
Agreed, lots of steps involved.
FR
Francene 6 months ago
This question is tricky.
VA
Van 7 months ago
This is a solid approach, love the attention to security!
MA
Malinda 7 months ago
Nice, but what if we need a privileged pod for a specific task?
NA
Nan 7 months ago
Wait, can we really block all privileged pods like this?
VI
Vilma 7 months ago
Totally agree, this is a must for security!
QU
Quentin 7 months ago
Just created a PodSecurityPolicy to block privileged pods!
GO
Goldie 8 months ago
Alright, let's do this! I'm ready to put my Kubernetes skills to the test.
FE
Felicitas 8 months ago
Haha, "prevent-privileged-policy" - I wonder if that's a subtle hint that we shouldn't be creating privileged pods in the first place!
RO
Rossana 8 months ago
Wait, we need to create a ClusterRole and a ClusterRoleBinding too? This is getting a bit complicated.
DO
Doug 9 months ago
Hmm, creating a PodSecurityPolicy and then binding it to a ServiceAccount seems like a lot of work. Is there an easier way to do this?
BR
Bronwyn 9 months ago
This looks like a pretty straightforward task. I think I can handle it.
CA
Carin 9 months ago
I think the validation step is crucial. If we try to create a privileged pod and it fails, that should confirm our policy is working, right?
CA
Candra 9 months ago
I feel a bit confused about the role of the ServiceAccount in this setup. Does it really need to be created in the default namespace, or can it be in any namespace?
PA
Pa 9 months ago
I practiced something similar last week, but I can't recall the exact syntax for creating the ClusterRoleBinding. I hope I can remember it during the exam.
MI
Mindy 9 months ago
I think I remember that we need to set the `privileged` field to `false` in the PodSecurityPolicy to prevent privileged pods, but I'm not entirely sure about the other required fields.
ER
Ernie 10 months ago
I'm feeling pretty confident about this one. I've worked with PodSecurityPolicies before, so I know the general approach. As long as I follow the instructions closely, I think I can get this done without too much trouble.
JE
Jesus 10 months ago
This seems like a good opportunity to practice my Kubernetes manifests. I'll try to write out the YAML for each resource ahead of time, then apply them in the correct order. Hopefully that will help me avoid any silly mistakes.
LI
Lindsey 10 months ago
Okay, I think I've got a handle on this. The key is to create the PodSecurityPolicy first, then the other resources that reference it. I'll make sure to double-check my work before submitting, just to be safe.
PE
Pete 10 months ago
Hmm, I'm a bit confused about the order of the steps here. Do I need to create the PodSecurityPolicy first, or can I start with the ServiceAccount? I'll have to read through the instructions carefully to make sure I don't miss anything.
BU
Bulah 10 months ago
This looks like a pretty straightforward task, but I'll need to be careful to follow all the steps precisely. I'll start by creating the PodSecurityPolicy, then the ServiceAccount, ClusterRole, and ClusterRoleBinding.
SH
Shonda 3 months ago
↳ replying to Bulah
Don't forget to test it after!
AL
Alease 4 months ago
↳ replying to Bulah
Agreed! The order is important.
CH
Charlesetta 4 months ago
↳ replying to Bulah
Sounds easy enough! Just need to follow the steps.
0/2000 characters

Save Cancel