Score: 4%

Context
You have been asked to create a new ClusterRole for a deployment pipeline and bind it to a specific ServiceAccount scoped to a specific namespace.
Task
Create a new ClusterRole named deployment-clusterrole, which only allows to create the following resource types:
* Deployment
* StatefulSet
* DaemonSet
Create a new ServiceAccount named cicd-token in the existing namespace app-team1.
Bind the new ClusterRole deployment-clusterrole lo the new ServiceAccount cicd-token , limited to the namespace app-team1.
Suggested Answer: A
Get Premium CKA Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
16 comments · newest first
CA
Carmen
11 months ago
I thought you could just use a Role instead of a ClusterRole for namespace-scoped permissions?
DE
Derick
11 months ago
Nice, I love how straightforward this is!
RA
Ranee
12 months ago
Wait, is it really necessary to create a ClusterRole for just those resources? Seems overkill.
YV
Yvette
12 months ago
Totally agree, that’s a common mistake!
CH
Chauncey
1 year ago
Just a heads up, the rolebinding command should reference the correct namespace for the ServiceAccount.
MA
Matilda
1 year ago
I’m a bit confused about the namespace part; I think we need to make sure the ServiceAccount is in the right namespace when binding it.
WI
Willis
1 year ago
I know we have to specify the resources correctly, but did we cover if we need to use "kubectl create rolebinding" or "kubectl create clusterrolebinding"?
VA
Vanna
1 year ago
I practiced something similar last week, but I feel like I mixed up the commands for ClusterRole and RoleBinding.
RO
Roselle
1 year ago
I think I remember that we need to create a ClusterRole with specific permissions, but I'm not sure about the exact syntax for binding it to the ServiceAccount.
WI
Wilford
1 year ago
I feel confident about this task. I've done similar things before, so I think I can knock this out quickly. I'll just need to be careful with the syntax and make sure I get the namespacing right.
CA
Carey
1 year ago
This seems pretty straightforward, but I want to make sure I understand the context and requirements fully before I start. I'll read through the question a few times to make sure I don't miss anything.
AL
Aliza
1 year ago
Okay, I think I've got a plan. I'll start by creating the ClusterRole, then the ServiceAccount, and finally the RoleBinding to connect them. As long as I follow the instructions carefully, I should be able to complete this task.
AL
Alexia
1 year ago
Hmm, I'm a bit unsure about the exact syntax for creating the ClusterRole and binding it to the ServiceAccount. I'll need to double-check the Kubernetes documentation to make sure I get the commands right.
RO
Rosio
1 year ago
This looks like a straightforward task, I should be able to handle it. I'll need to create the ClusterRole, ServiceAccount, and RoleBinding as specified.
DI
Dion
1 year ago
Ah, I see now. The key is to reference the device variable from the YANG model, as mentioned in option D. That should allow me to properly enter the device into the YANG model.
CR
Craig
1 year ago
Okay, let's see. If the label doesn't exist in the LFIB, the frame should be discarded, right? I'll mark that as my answer.