When considering the principle of least privilege within a cloud native architecture, what is the recommended approach for granting permissions to a Kubernetes application running in a Pod?
A dedicated ServiceAccount bound to narrowly scoped RBAC roles grants the Pod only the specific API verbs and resources it needs, rather than inheriting broad default permissions. This enforces least privilege at the Kubernetes API authorisation layer.
Why this answer
Least privilege in Kubernetes is achieved by creating a dedicated ServiceAccount per workload and binding it to narrowly scoped Roles or ClusterRoles that grant only the specific API verbs and resources the application needs. This limits the blast radius if the Pod is compromised, since its mounted token can only perform the permitted actions.
Exam trap
KCSA often tests least privilege by offering 'convenience' answers like cluster-admin or a shared ServiceAccount, so candidates optimizing for compatibility rather than security pick the over-privileged option.
How to eliminate wrong answers
Option A is wrong because a single global ServiceAccount shared across namespaces violates least privilege—any compromise grants the same permissions cluster-wide and eliminates per-workload isolation. Option B is wrong because mounting the default ServiceAccount token with cluster-admin rights grants full control of the cluster, the exact opposite of least privilege, and the default token is auto-mounted unless disabled. Option C is wrong because disabling authentication removes the ability to authorize or audit requests, effectively granting anonymous access rather than restricting it.