Given an existing Pod named nginx-pod running in the namespace test-system, fetch the service-account-name used and put the content in /candidate/KSC00124.txt
Create a new Role named dev-test-role in the namespace test-system, which can perform update operations, on resources of type namespaces.
Create a new RoleBinding named dev-test-role-binding, which binds the newly created Role to the Pod's ServiceAccount ( found in the Nginx pod running in namespace test-system).
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
32 comments · newest first
MI
Mila
11 months ago
Don't forget to check the permissions on the Role, super important!
AL
Alecia
12 months ago
Just did this yesterday, works like a charm!
RO
Ronny
12 months ago
Wait, can you really bind a Role to a Pod's ServiceAccount like that? Seems risky.
KA
Karan
12 months ago
Totally agree, that's the right command!
GU
Gussie
1 year ago
The service account name can be found using `kubectl get pod nginx-pod -n test-system -o=jsonpath='{.spec.serviceAccountName}'`.
EL
Elise
1 year ago
I feel like I’ve seen a question like this before, but I’m worried I might mix up the namespace and the service account details.
DO
Douglass
1 year ago
For the Role creation, I think we need to specify the verbs and resources, but I’m a bit confused about the exact format for the YAML file.
JE
Jettie
1 year ago
This question seems similar to one we practiced where we had to create a Role and RoleBinding. I hope I can recall the syntax correctly.
FR
Freeman
1 year ago
I think I remember how to fetch the service account name from the pod, but I'm not entirely sure about the exact command to use.
DY
Dyan
1 year ago
Wait, what's the namespace for the nginx-pod again? I need to make sure I create the Role and RoleBinding in the correct namespace. Let me double-check that detail.
VI
Vi
1 year ago
No problem, I've got this. First, I'll use the `kubectl get pod` command to find the service-account-name for the nginx-pod. Then, I'll create the new Role and RoleBinding using the `kubectl create role` and `kubectl create rolebinding` commands.
CA
Carman
1 year ago
Hmm, I'm a bit unsure about the second part. Creating a new Role and RoleBinding seems a bit tricky. I'll need to review my notes on RBAC to make sure I do this correctly.
CH
Christiane
1 year ago
Okay, this looks like a straightforward Kubernetes question. I'll start by fetching the service-account-name used by the nginx-pod and saving it to the specified file.
QU
Quentin
1 year ago
I'm feeling pretty confident about this one. Contracts are what define an agent's capabilities and responsibilities, so that's the core connection.
DO
Dottie
1 year ago
Hmm, this seems like a tricky one. I'll need to think through the relationships carefully to make sure I get the right approach.
TA
Tawanna
1 year ago
Okay, let me think this through step-by-step. The Copy/Monitor tool is used for, well, copying and monitoring elements. The options given are Grids, Levels, Walls, and Windows. I know Grids, Levels, and Windows are all common element categories, but I'm not sure about Walls. I'll have to go with my best guess on this one.
BE
Bev
1 year ago
I think the requirement for User Group 1 was pretty high, possibly closer to 512 GB of RAM based on what I studied.
KA
Katie
1 year ago
I bet the exam writers are feeling pretty clever with this one. But I'm not going to fall for their tricks! Bring it on!
SO
Socorro
1 year ago
User 3
CH
Christoper
1 year ago
User 2
GA
Garry
1 year ago
User 1
CO
Coleen
1 year ago
User 3
EL
Elly
1 year ago
User 2
RO
Rolande
1 year ago
User 1
RU
Rueben
2 years ago
Eve
ED
Edison
1 year ago
Make sure to bind the Role to the Pod's ServiceAccount in the namespace test-system.
GE
Gerald
1 year ago
After that, we can create a new RoleBinding named dev-test-role-binding.
LO
Lonny
1 year ago
Yes, we should create a new Role named dev-test-role next.
PR
Precious
2 years ago
I think we need to fetch the service-account-name used in the nginx-pod first.
EV
Evelynn
2 years ago
I'm going to start by examining the existing Pod and service account.
SE
Selma
2 years ago
I agree, but I believe with the right approach we can figure it out.
EV
Evelynn
2 years ago
I think the question is quite challenging.