A Kubernetes RBAC audit helps you find excessive permissions, unclear ownership, and risky access paths before they become an incident. This checklist provides a repeatable way to review Roles, ClusterRoles, bindings, service accounts, human access, namespace boundaries, and cloud-provider IAM connections without removing permissions blindly.
Overview
Kubernetes Role-Based Access Control (RBAC) determines which identities can perform which actions against Kubernetes API resources. A permission is normally evaluated through three connected objects: a Role or ClusterRole that defines verbs and resources, a RoleBinding or ClusterRoleBinding that assigns those permissions, and a subject such as a user, group, or service account.
The central audit question is not simply “Which roles exist?” It is “Which identity can perform which action, against which resource, in which scope, and for what reason?” Review effective access rather than relying only on role names. A role called read-only may still include sensitive resources, while a narrowly named binding may grant access across the entire cluster.
Before changing anything, establish an inventory and an owner for every production binding. Export the current state, record the cluster and context being reviewed, and separate observation from remediation. A useful worksheet includes:
- Cluster and environment
- Namespace
- Role or ClusterRole name
- Binding name and binding type
- Subject type and subject name
- Granted verbs and resources
- Whether the access is human or machine access
- Business or operational purpose
- Owner, last review date, and proposed action
Start with read-only inspection commands. For example:
kubectl config current-context
kubectl get roles,rolebindings -A
kubectl get clusterroles,clusterrolebindings
kubectl describe rolebinding -n <namespace> <binding>
kubectl describe clusterrolebinding <binding>
kubectl describe role -n <namespace> <role>
kubectl describe clusterrole <clusterrole>Use an approved export or policy-audit tool when the environment requires reporting across many clusters. Tool output should be treated as an input to human review: confirm the Kubernetes version, account context, aggregation behavior, and whether the tool evaluates effective access or only object definitions.
Checklist by scenario
1. Cluster-wide access
- List every
ClusterRoleBindingand identify its owner. - Flag bindings to broad built-in or custom roles, especially those containing wildcard verbs or resources.
- Review access to secrets, workloads, nodes, persistent volumes, webhooks, admission configuration, and authorization-related resources.
- Check whether a namespace-scoped Role would satisfy the use case instead.
- Confirm that cluster administration is limited to a small, documented set of human identities and tightly controlled automation.
- Review subjects bound through groups, because a single group membership change can affect many users.
kubectl get clusterrolebindings -o wide
kubectl get clusterrole <role> -o yaml
kubectl auth can-i --list --as=<user-or-service-account>2. Namespace access and boundaries
- Enumerate RoleBindings in every application namespace.
- Confirm that application teams receive access only to namespaces they operate.
- Check whether a
ClusterRoleis being attached through a namespace-local RoleBinding. This can be valid, but the effective rules still need review. - Look for bindings that connect identities from one environment to another without a clear reason.
- Verify that shared namespaces have an explicit ownership model and documented exceptions.
- Review access to secrets, config maps, deployments, jobs, and pod execution separately; these permissions do not carry the same operational risk.
kubectl get rolebindings -A -o wide
kubectl auth can-i get secrets -n <namespace> --as=<subject>
kubectl auth can-i create pods/exec -n <namespace> --as=<subject>3. Service accounts and workload identity
- List service accounts used by Deployments, Jobs, CronJobs, StatefulSets, and other workload controllers.
- Replace unnecessary use of the namespace's default service account with a purpose-specific account.
- For each service account, identify its RoleBindings and ClusterRoleBindings.
- Check whether the workload needs API access at all. Many workloads can run with automounting disabled.
- Separate permissions for controllers, deployment agents, monitoring components, and application code.
- Review token handling, projected tokens, and cloud-provider workload identity configuration together.
kubectl get serviceaccounts -A
kubectl get pods -A -o custom-columns='NAMESPACE:.metadata.namespace,NAME:.metadata.name,SERVICEACCOUNT:.spec.serviceAccountName'
kubectl get rolebindings,clusterrolebindings -A -o yaml | grep -n 'kind: ServiceAccount'Where supported by the cluster and identity integration, validate both Kubernetes RBAC and cloud IAM. A service account may have limited Kubernetes permissions while still receiving broad permissions in a cloud account, or the reverse. Treat the two authorization layers as separate review tracks with a documented relationship.
4. Human access and impersonation
- Map Kubernetes users and groups to an identity provider, administrator group, or access platform.
- Separate routine developer access from break-glass and cluster-administrator access.
- Review permissions to impersonate users, groups, and service accounts. These permissions can effectively expand access beyond the visible binding.
- Confirm that support and incident-response access is time-bound, approved, and logged where possible.
- Test representative identities with
kubectl auth can-irather than testing only the administrator account.
kubectl auth can-i --list --as=<user>
kubectl auth can-i --list --as=system:serviceaccount:<namespace>:<service-account>
kubectl auth can-i impersonate users --as=<reviewer>5. CI/CD and platform automation
- Identify every pipeline, GitOps controller, operator, and platform component that writes to the cluster.
- Use separate identities for development, staging, and production.
- Limit deployment identities to the resources and namespaces they actually manage.
- Check whether a pipeline can create or modify RBAC objects, admission configuration, nodes, or privileged workloads.
- Document emergency permissions separately from normal release permissions.
- Re-test access after changing charts, controllers, namespaces, or deployment tooling.
What to double-check
Wildcard rules: Search for * in verbs, API groups, and resources. Wildcards are difficult to reason about as APIs evolve and can grant more access than the original workload requires. Replace them with an explicit list where practical.
Secrets and pod execution: Reading secrets, creating or modifying pods, and using pod execution features can provide access to application data or workload credentials. Review these permissions as high-impact capabilities, even when the role name sounds operational.
Role aggregation: Custom labels can cause rules to be aggregated into built-in user-facing roles. Inspect the complete role definition and its labels rather than reviewing only the YAML file that appears to grant access.
Binding scope: A RoleBinding is namespaced, while a ClusterRoleBinding grants cluster-wide scope. A ClusterRole attached through a RoleBinding is still limited by that binding's namespace, but the role's rules may be broader than intended for that namespace.
Inactive objects: An unused role is not automatically harmless. An old RoleBinding, dormant service account, or inherited group membership can become active again when a workload or identity is reused. Record whether objects are unused, then remove them through a controlled change process.
Audit evidence: Kubernetes object inspection shows configured access, while API server audit logs and identity-provider records can help show use. Compare configuration with observed activity where retention and privacy controls permit. Absence of observed use should not be treated as proof that permission is safe to remove.
Version and provider differences: Authorization behavior, built-in roles, admission controls, and workload identity integrations can vary by Kubernetes version and managed service. Verify commands and assumptions against the cluster version before applying a remediation plan. For related operational preparation, see the Kubernetes upgrade readiness checklist.
Common mistakes
- Deleting first and investigating later: Export the configuration, identify the owner, and test a replacement path before removing access.
- Auditing role definitions without bindings: A role has no effective subject until a binding assigns it. Review both sides of the relationship.
- Ignoring groups: Group membership can create indirect access that is not obvious from an individual user's record.
- Using one service account for many workloads: Shared identities make attribution difficult and turn a single compromise into a broader access event.
- Assuming read-only is low risk: Read access to secrets, configuration, or workload metadata may expose credentials or sensitive operational details.
- Confusing Kubernetes RBAC with cloud IAM: A complete review must cover the Kubernetes API and the cloud resources reachable through workload or node identity.
- Relying only on a scanner: Automated findings are useful for prioritization, but owners must validate intended behavior and dependencies.
- Granting broad access to fix deployment failures: Capture the denied action, add the narrowest required permission, and retest. Do not use cluster-admin as a general troubleshooting shortcut.
For adjacent controls, pair this review with a secrets-management assessment and a Helm chart review. The secrets management comparison covers storage and delivery choices, while the Helm chart review checklist helps identify permissions introduced by deployment templates.
When to revisit
Make RBAC review a recurring control rather than a one-time cleanup. Revisit the inventory at least during your organization's established access-review cycle, and sooner when any of these events occur:
- A new cluster, namespace, team, workload, or platform component is introduced.
- A Kubernetes version, managed-service configuration, admission policy, or identity integration changes.
- A team member changes role, leaves the organization, or moves between environments.
- A CI/CD, GitOps, operator, or internal developer platform workflow changes.
- An incident, suspicious access event, or failed authorization review occurs.
- A cloud IAM role, workload identity mapping, node role, or secret-delivery mechanism changes.
- Seasonal planning or compliance preparation begins.
At each review, export the current objects, compare them with the previous approved inventory, identify new or changed bindings, and assign an owner to every exception. Prioritize removal of unused accounts, replacement of wildcards, separation of shared service accounts, and reduction of cluster-wide grants. Test proposed changes in a non-production environment, validate representative workloads with kubectl auth can-i, then use a staged rollout and a documented rollback path.
Keep this checklist with the cluster's operational documentation and update it when workflows or tools change. For broader platform governance, compare it with your internal developer platform selection guide and your Kubernetes upgrade readiness process. The goal is not to remove access indiscriminately; it is to make every permission understandable, necessary, owned, and reviewable.