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 3 Question 64 Discussion

Posted by Brigette on Sep 14, 2024 at 04:06 PM

You can switch the cluster/configuration context using the following command: [desk@cli] $kubectl config use-context prod-account

Context: A Role bound to a Pod's ServiceAccount grants overly permissive permissions. Complete the following tasks to reduce the set of permissions. Task: Given an existing Pod namedweb-podrunning in the namespacedatabase. 1. Edit the existing Role bound to the Pod's ServiceAccounttest-sato only allow performing get operations, only on resources of type Pods. 2. Create a new Role namedtest-role-2in the namespacedatabase, which only allows performingupdateoperations, only on resources of typestatuefulsets. 3. Create a new RoleBinding namedtest-role-2-bindbinding the newly created Role to the Pod's ServiceAccount. Note: Don't delete the existing RoleBinding.

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
25 comments · newest first
LE
Lelia 11 months ago
I thought RoleBindings were only for ClusterRoles.
AL
Alishia 11 months ago
Wait, can we really bind a Role to a ServiceAccount like that?
WI
Willie 12 months ago
Totally agree, less is more with permissions!
GR
Graciela 12 months ago
Sounds straightforward, but why not just create a new Role?
AM
Amie 1 year ago
Just need to edit the Role for get permissions on Pods.
OW
Owen 1 year ago
I think I can handle the first task, but the part about creating the new Role for StatefulSets feels a bit tricky. I hope I can recall the right resource type.
SA
Sabra 1 year ago
I feel a bit confused about the difference between Roles and RoleBindings. I hope I can remember how to create the new Role without making mistakes.
EL
Elena 1 year ago
This seems similar to that practice question where we had to create a RoleBinding. I think I need to recall how to bind the new Role to the ServiceAccount correctly.
TR
Tran 1 year ago
I remember we practiced editing Roles before, but I'm not entirely sure about the exact syntax for restricting permissions to just "get" operations.
RO
Ronna 1 year ago
No problem, I've done similar tasks before. I'll start by using the `kubectl config use-context` command to switch to the right context, then work through the tasks one by one.
ST
Stephanie 1 year ago
I'm a bit confused by the wording of the tasks. I'll need to double-check the Kubernetes documentation to make sure I'm interpreting everything correctly.
NI
Nieves 1 year ago
Hmm, this seems straightforward enough. I think I can handle this - just need to edit the existing Role and create a new Role and RoleBinding as specified.
PA
Pansy 1 year ago
Okay, this looks like a tricky one. I'll need to carefully read through the tasks and make sure I understand exactly what I need to do.
DE
Delfina 1 year ago
Okay, let me think this through. Forecasting is definitely more than just looking at past revenue and expenses - it involves evaluating market conditions and economic indicators too. I'm leaning towards option C.
KI
Kimi 2 years ago
Haha, I bet the exam writers are really testing our attention to detail with this one. Gotta make sure I don't miss any of those specific requirements!
ME
Melda 2 years ago
↳ replying to Kimi
It's all about precision and following the instructions to the letter.
JU
Justa 2 years ago
↳ replying to Kimi
I know, we have to be careful to only allow specific operations on specific types of resources.
EV
Eva 2 years ago
↳ replying to Kimi
Yeah, they definitely want us to pay close attention to the details in this task.
NI
Nina 2 years ago
Looks good to me! Reducing the permissions on the Role bound to the ServiceAccount is the way to go. Can't wait to get this one right!
SA
Salome 2 years ago
↳ replying to Nina
Let's make sure we test everything thoroughly before applying these changes.
LE
Leah 2 years ago
↳ replying to Nina
I think we need to be careful with the new Role and RoleBinding.
WI
Wilda 2 years ago
↳ replying to Nina
I agree, reducing permissions is crucial for security.
IR
Ira 2 years ago
I think the tasks provided are clear and will help in securing the cluster.
LE
Leatha 2 years ago
I agree, it's important to understand how to manage permissions in Kubernetes.
IR
Ira 2 years ago
I find this question about switching cluster context interesting.
0/2000 characters

Save Cancel