Linux_Foundation
CKS · Question #46
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 permiss
Sign in or unlock CKS to reveal the answer and full explanation for question #46. The question stem and answer options stay visible for context.
Submitted by hassan_iq· May 4, 2026Cluster Hardening
Question
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 named web-pod running in the namespace database.
- Edit the existing Role bound to the Pod's ServiceAccount test-sa to only allow performing get operations, only on resources of type Pods.
- Create a new Role named test-role-2 in the namespace database, which only allows performing update operations, only on resources of type statefulsets.
- Create a new RoleBinding named test-role-2-bind binding the newly created Role to the Pod's ServiceAccount.
Exhibits
Unlock CKS to see the answer
You've previewed enough free CKS questions. Unlock CKS for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#RBAC#ServiceAccounts#Least Privilege#Kubernetes Security

