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

Actual exam question for Linux Foundation's CKS exam
Question #: 87
Topic #: 6
[All CKS Questions]

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.

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

0/2000 characters
Goldie
11 hours ago
Alright, let's do this! I'm ready to put my Kubernetes skills to the test.
upvoted 0 times
...
Felicitas
5 days 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!
upvoted 0 times
...
Rossana
27 days ago
Wait, we need to create a ClusterRole and a ClusterRoleBinding too? This is getting a bit complicated.
upvoted 0 times
...
Doug
1 month 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?
upvoted 0 times
...
Bronwyn
1 month ago
This looks like a pretty straightforward task. I think I can handle it.
upvoted 0 times
...
Carin
1 month 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?
upvoted 0 times
...
Candra
2 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?
upvoted 0 times
...
Pa
2 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.
upvoted 0 times
...
Mindy
2 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.
upvoted 0 times
...
Ernie
2 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.
upvoted 0 times
...
Jesus
2 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.
upvoted 0 times
...
Lindsey
2 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.
upvoted 0 times
...
Pete
3 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.
upvoted 0 times
...
Bulah
3 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.
upvoted 0 times
...

Save Cancel