ExamGecko
Question list
Search
Search

List of questions

Search

Question 49 - CKA discussion

Report
Export

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.

A.
See the solution below.
Answers
A.
See the solution below.
Suggested answer: A

Explanation:

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

asked 18/09/2024
Mohamed Hany
42 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first