Question 40
At Northstar finance, in an isolated training cluster during a scheduled maintenance rehearsal: A controller identity in ledger needs only get, list, and watch access to Pods rather than namespace administrator privileges. Work only within the stated target and verify before declaring success. Which operational control most directly prevents this failure or configuration drift?
Explanation
Correct Answer
Keep namespace-scoped read policies in version control and avoid wildcard verbs or resources. This reduces recurrence of the specific operational failure. It reinforces the action: Run kubectl -n ledger create role invoice-api-pod-reader --verb=get,list,watch --resource=pods. The relevant mechanism is: A namespaced Role expresses allowed resource verbs; it has no effect until a RoleBinding associates a subject.
Incorrect Answers
This routine guards against another mechanism: Nodes are cluster-scoped and their access rules belong in a ClusterRole rather than a namespaced Role. The recurring exposure in the current case is: A namespaced Role expresses allowed resource verbs; it has no effect until a RoleBinding associates a subject. The matching preventive check is “Keep namespace-scoped read policies in version control and avoid wildcard verbs or resources”.
The suggested review tracks a different technical risk: RBAC authorization decisions depend on the subject, verb, resource and namespace; an admin's own access does not prove the workload identity's access. Here the sustained control must address: A namespaced Role expresses allowed resource verbs; it has no effect until a RoleBinding associates a subject. Choose “Keep namespace-scoped read policies in version control and avoid wildcard verbs or resources”.
That safeguard is relevant to: A ResourceQuota caps combined admitted requests in a namespace; per-Pod limits alone do not enforce a namespace-wide budget. The current failure instead follows from: A namespaced Role expresses allowed resource verbs; it has no effect until a RoleBinding associates a subject. Its prevention measure is “Keep namespace-scoped read policies in version control and avoid wildcard verbs or resources”.