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 CKA Exam - Topic 1 Question 100 Discussion

SIMULATIONScore: 4%ContextYou have been asked to create a new ClusterRole for a deployment pipeline and bind it to a specific ServiceAccount scoped to a specific namespace.TaskCreate a new ClusterRole named deployment-clusterrole, which only allows to create the following resource types:* Deployment* StatefulSet* DaemonSetCreate 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.
A) See the solution below

Linux Foundation CKA Exam - Topic 1 Question 100 Discussion

Actual exam question for Linux Foundation's CKA exam
Question #: 100
Topic #: 1
[All CKA Questions]

SIMULATION

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.

Show Suggested Answer Hide Answer
Suggested Answer: A

Solution:

Task should be complete on node k8s -1 master, 2 worker for this connect use command

[student@node-1] > ssh k8s

kubectl create clusterrole deployment-clusterrole --verb=create --resource=deployments,statefulsets,daemonsets

kubectl create serviceaccount cicd-token --namespace=app-team1

kubectl create rolebinding deployment-clusterrole --clusterrole=deployment-clusterrole --serviceaccount=default:cicd-token --namespace=app-team1


Contribute your Thoughts:

0/2000 characters
Elke
2 days ago
Just did this last week, super straightforward!
upvoted 0 times
...
Nickole
8 days ago
Wait, can you really limit a ClusterRole to just one namespace?
upvoted 0 times
...
Santos
13 days ago
Totally agree, this is a common setup for CI/CD pipelines!
upvoted 0 times
...
Shaquana
18 days ago
You can create a ClusterRole with specific permissions for resources like Deployment, StatefulSet, and DaemonSet.
upvoted 0 times
...
Freida
23 days ago
I think I need to double-check how to create a ServiceAccount in a specific namespace. I hope I remember the right command!
upvoted 0 times
...
Ricki
28 days ago
I feel a bit uncertain about the resource types. Are we sure we only need to allow Deployment, StatefulSet, and DaemonSet?
upvoted 0 times
...
Marquetta
1 month ago
This seems similar to that practice question where we had to set permissions for a specific namespace. I think I can recall the steps.
upvoted 0 times
...
Nadine
1 month ago
I remember we practiced creating ClusterRoles, but I’m not sure about the exact syntax for binding it to a ServiceAccount.
upvoted 0 times
...

Save Cancel