BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation Exam CKS Topic 6 Question 67 Discussion

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

You can switch the cluster/configuration context using the following command: [desk@cli] $kubectl config use-context stage Context: A PodSecurityPolicy shall prevent the creation of privileged Pods in a specific namespace. Task: 1. Create a new PodSecurityPolcy named deny-policy, which prevents the creation of privileged Pods. 2. Create a new ClusterRole name deny-access-role, which uses the newly created PodSecurityPolicy deny-policy. 3. Create a new ServiceAccount named psd-denial-sa in the existing namespace development. Finally, create a new ClusterRoleBindind named restrict-access-bind, which binds the newly created ClusterRole deny-access-role to the newly created ServiceAccount psp-denial-sa

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Derick
25 days ago
This is a solid solution, but I'm wondering if there are any potential pitfalls or edge cases we should consider. It's always good to think about the what-ifs.
upvoted 0 times
Vincenza
10 days ago
Have you thought about any potential pitfalls or edge cases with this solution?
upvoted 0 times
...
...
Lashawn
1 months ago
The example looks great, but I'm curious if there's a way to make the `PodSecurityPolicy` more flexible. Perhaps we could add some additional rules or constraints to handle different use cases.
upvoted 0 times
Vinnie
6 days ago
User3
upvoted 0 times
...
Camellia
18 days ago
User2
upvoted 0 times
...
Alpha
25 days ago
User1
upvoted 0 times
...
...
Jeannetta
1 months ago
Exactly, then we create a ServiceAccount and bind it to the ClusterRole.
upvoted 0 times
...
Verona
2 months ago
Yes, we need to create deny-policy and bind it to deny-access-role.
upvoted 0 times
...
Jeannetta
2 months ago
I think the question is about creating a PodSecurityPolicy to prevent privileged Pods.
upvoted 0 times
...
Lili
2 months ago
The solution seems comprehensive, but I'm wondering if there's a more concise way to achieve the same result. Maybe we can combine some of the YAML manifests into a single file.
upvoted 0 times
...
Francoise
2 months ago
Haha, I like how they're using `psp-denial-sa` as the service account name. It's like they're telling the Pods, 'No privileged access for you!'
upvoted 0 times
...
Dewitt
2 months ago
Looks good, but I'm not sure if the `resourceNames` field in the `ClusterRole` is necessary. I thought the `use` verb alone would be enough to bind the `PodSecurityPolicy` to the `ClusterRole`.
upvoted 0 times
Erinn
1 months ago
I see, thanks for clarifying that. It's always good to double-check the documentation to be sure.
upvoted 0 times
...
Ettie
2 months ago
The `resourceNames` field is used to specify which `PodSecurityPolicy` the `ClusterRole` should use.
upvoted 0 times
...
...

Save Cancel