Who holds cluster-admin is the single most important access question in a Kubernetes cluster, and the honest answer is rarely just the ClusterRoleBindings that name it. Superuser access also comes from the system:masters group in client certificates, from cloud provider mappings such as EKS access policies and AKS local admin credentials, from RoleBindings to cluster-admin inside namespaces, and from ordinary-looking permissions such as bind, escalate and impersonate that let a subject grant itself the role. This runbook finds all of them, separates the legitimate from the accidental, and shows how to remove bindings safely with a rollback. It is for platform engineers and security teams running self-managed, EKS, AKS or GKE clusters. For how RBAC works in general, see the Kubernetes RBAC Guide; this page is the audit task.
This is an independent guide from NHI Mgmt Group, based on the Kubernetes documentation and the AWS, Microsoft and Google documentation for their managed services as of November 2026. It is not sponsored or reviewed by any of them. Confirm settings against current documentation.
Key takeaways
- Bindings are only one route. Members of
system:mastersbypass RBAC and any authorisation webhook, and Kubernetes states this cannot be revoked by removing RoleBindings or ClusterRoleBindings. - Look at RoleBindings too. A RoleBinding to
cluster-admingives full control of that namespace, including the namespace object itself. - Count the equivalents.
bind,escalate,impersonate, wildcard rules,createonserviceaccounts/tokenandgetonnodes/proxycan each reach cluster-admin. - Check the cloud layer. EKS
AmazonEKSClusterAdminPolicy, AKS local accounts and GKE IAM roles grant cluster-wide control outside the cluster's own RBAC objects. - Never edit the default binding. The API server reconciles default
system:roles and bindings at start-up; reduce access by removing other bindings and the credentials behind them.
When you need this
- Periodic access review: Kubernetes calls periodic RBAC review "vital", partly because a new account created with a deleted user's name inherits that user's bindings.
- After installing operators and tools: install scripts and vendor charts often request
cluster-adminfor their service account. - Incident response: creating a binding to
cluster-adminis a classic persistence step (ATT&CK T1098.006 Additional Container Cluster Roles). See the Kubernetes Cluster Compromise Playbook. - Audit evidence: NIST SP 800-53 AC-6(5) Privileged Accounts and AC-6(7) Review of User Privileges expect a short, reviewed list of privileged subjects.
Before you start
| Route to superuser | Where it lives | How to see it |
|---|---|---|
ClusterRoleBinding to cluster-admin | Kubernetes API | kubectl get clusterrolebindings |
RoleBinding to cluster-admin | Each namespace | kubectl get rolebindings -A |
Other ClusterRoles with * on * | Custom or vendor ClusterRoles | kubectl get clusterroles -o yaml |
system:masters group | Client certificates (organisation field) and any authenticator that maps users into it | Certificate inventory; kubeconfig review; provider settings |
| EKS access policy | EKS access entries; legacy aws-auth ConfigMap | aws eks list-access-entries, list-associated-access-policies |
| AKS local admin | Cluster property disableLocalAccounts | az aks show; az aks get-credentials --admin test |
| GKE IAM | Project IAM policy | GKE checks RBAC then IAM, so an IAM grant can authorise what RBAC does not |
Audit with a read-only identity that can list RBAC objects cluster-wide. Do not use a system:masters certificate for the audit itself: those requests skip authorisation and do not exercise RBAC. Export every RBAC object to version control before you change anything; that export is your rollback.
kubectl get clusterroles,clusterrolebindings -o yaml > rbac-cluster-backup.yaml
kubectl get roles,rolebindings -A -o yaml > rbac-namespaced-backup.yaml
Step-by-step
Steps 1 to 6 are read-only. Step 7 changes access and needs owner agreement. Step 8 may need certificate rotation.
- List ClusterRoleBindings to cluster-admin and their subjects.
Expect the defaultkubectl get clusterrolebindings -o jsonpath='{range .items[?(@.roleRef.name=="cluster-admin")]}{.metadata.name}{"\t"}{.subjects}{"\n"}{end}'cluster-adminbinding to thesystem:mastersgroup. Every other line is a finding to explain. - List RoleBindings to cluster-admin in every namespace.
Namespace owners usually needkubectl get rolebindings -A -o jsonpath='{range .items[?(@.roleRef.name=="cluster-admin")]}{.metadata.namespace}{"\t"}{.metadata.name}{"\t"}{.subjects}{"\n"}{end}'admin, which cannot write resource quotas or the namespace itself;cluster-adminin a RoleBinding can. - Find cluster-admin equivalents. Review every ClusterRole and Role whose rules contain
*in verbs, resources or apiGroups, and every role granting the verbs in the table below. Kubernetes warns that wildcards cover future resource types as well as current ones. Then list who is bound to those roles, using the same jsonpath pattern with each role name. - Test effective access for each subject. For each non-default subject, confirm what it can really do:
For users and groups usekubectl auth can-i '*' '*' --as=system:serviceaccount:NAMESPACE:NAME kubectl auth can-i --list --as=system:serviceaccount:NAMESPACE:NAME -n NAMESPACE--as=USERand--as-group=GROUP. A "yes" to'*' '*'means superuser whatever the role is called. - Check the cloud provider layer.
- EKS: list access entries with
aws eks list-access-entries --cluster-name CLUSTER, then for each principal runaws eks list-associated-access-policies --cluster-name CLUSTER --principal-arn ARNand flagarn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy, which grants wildcards on everything, including non-resource URLs. NoteaccessScope.type:clusterornamespace. Review theaws-authConfigMap as well if the cluster still uses it; entries there are not migrated automatically. The automatic creator entry is a common forgotten admin. - AKS: Microsoft documents that local accounts are enabled by default and that
--adminaccess is "non-auditable". CheckdisableLocalAccountsand test withaz aks get-credentials --resource-group RG --name CLUSTER --admin; on a hardened cluster it fails with "Getting static credential isn't allowed because this cluster is set to disable local accounts." - GKE: GKE checks RBAC first and then IAM, so a principal with broad Kubernetes Engine IAM roles on the project can act in the cluster without any binding. Review project IAM alongside RBAC, and check Google Groups bound through
gke-security-groups.
- EKS: list access entries with
- Find system:masters credentials. Inventory issued client certificates whose organisation is
system:masters: kubeconfigs created at bootstrap, admin certificates generated by installers, and break-glass files. On AKS, admin credentials from--adminare such certificates. These cannot be removed with RBAC; the only revocation is to stop trusting them by rotating the cluster certificates. - Remove or narrow each unjustified binding. For each finding agree a replacement with the owner:
admin,editor a custom role in a RoleBinding, or a read-only ClusterRole for monitoring tools. BecauseroleRefis immutable, create the new binding first, verify withkubectl auth can-i, then delete the old one:
For EKS, disassociate the policy or replace it withkubectl delete clusterrolebinding BINDING_NAMEAmazonEKSAdminPolicyscoped to namespaces. For AKS, runaz aks update --resource-group RG --name CLUSTER --disable-local-accountsafter confirming Entra ID admin groups work. - Revoke what bindings cannot. Where
system:masterscertificates or AKS admin credentials were handed out, rotate the cluster certificates (Microsoft documents this as required on existing AKS clusters after disabling local accounts). Plan this as a change with its own window, since every client must fetch new credentials.
Permissions to treat as cluster-admin
| Permission | Why Kubernetes flags it |
|---|---|
bind on roles or clusterroles | Create bindings to roles with rights the subject does not hold |
escalate on roles or clusterroles | Write roles containing permissions the subject does not hold |
impersonate on users, groups or service accounts | Act with another subject's rights |
create on serviceaccounts/token | Issue tokens for existing service accounts |
get on nodes/proxy | Kubelet API access, exec in pods, bypassing audit logging and admission control |
create on CSRs plus approval for kubernetes.io/kube-apiserver-client | Mint client certificates with any name |
list or watch on secrets cluster-wide | List responses include secret contents |
| Control of webhook configurations | Read, and with mutating webhooks change, every admitted object |
Prioritise the work
| Finding | Priority |
|---|---|
Binding of cluster-admin to system:serviceaccounts, system:authenticated or system:unauthenticated | 1, remove now |
| Service account of an internet-facing workload or CI system with cluster-admin | 1 |
| Unexplained binding created recently | 1, treat as a possible incident |
| Human users with standing cluster-admin | 2, move to impersonation or just-in-time elevation |
| Vendor tool with cluster-admin | 2, ask the vendor for a scoped ClusterRole |
| Named break-glass identity with cluster-admin | Keep, document, alert on use |
Where identity fits
Most surprising cluster-admin holders are non-human: controllers, operators, CI deployers and monitoring agents whose service accounts were bound to cluster-admin to make an install work. Their tokens sit inside pods, so anyone who can exec into those pods or read their mounted token holds the same power. Pair this audit with How to Find pods that automount service account tokens and the Kubernetes Service Account Token Guide. Kubernetes also advises limiting the nodes that run powerful pods and keeping them away from untrusted workloads.
Verify it worked
- Re-run steps 1 to 4: only the default binding and documented break-glass subjects remain.
- Effective access:
kubectl auth can-i '*' '*'returns "no" for every changed subject. - Cloud layer: no unexpected principal holds
AmazonEKSClusterAdminPolicy; the AKS--admintest fails. - Workloads: no new "forbidden" errors in controller logs; see the Kubernetes RBAC Forbidden Errors Troubleshooting Guide if they appear.
Rollback and common errors
| Situation | Fix |
|---|---|
| Controller breaks after a binding is removed | Re-apply the binding from the backup file, then build a scoped role from the forbidden errors it logs |
| Need to change a binding's role | roleRef cannot be edited; delete and recreate |
Changes to default system: roles disappear | Auto-reconciliation restores them at API server start-up; do not edit defaults |
| Bulk restore needed | kubectl auth reconcile -f rbac-cluster-backup.yaml --dry-run=client, then without the dry run |
| Admins locked out of AKS after disabling local accounts | az aks update --enable-local-accounts, fix Entra ID admin group membership, disable again |
Hardening afterwards
- Admission policy: reject new ClusterRoleBindings and RoleBindings to
cluster-adminoutside an allow list, starting in audit mode. See the Kubernetes Admission Control Guide. - Alert on change: in the API server audit log, alert on
create,updateorpatchofclusterrolebindingsandrolebindingswhose request referencescluster-admin, and on any request authenticated throughsystem:masters. See the Kubernetes Audit Log Detection Guide. - Low-privilege admins: Kubernetes recommends a low-privileged account with impersonation rights rather than daily cluster-admin use.
- Break-glass: keep one documented emergency path, stored offline, tested and alerted. See the Break-Glass Account Guide.
What to look for in the audit log
The API server audit log records who made each request, what object it touched and, at the Request or RequestResponse level, the object body. Make sure your audit policy logs RBAC objects at least at the Request level, otherwise you see that a binding was created but not which role it references. Useful patterns:
| Pattern | Audit event fields | Why it matters |
|---|---|---|
| New or changed binding to cluster-admin | objectRef.resource is clusterrolebindings or rolebindings; verb create, update or patch; requestObject.roleRef.name is cluster-admin | Persistence or an unreviewed grant |
| Superuser requests from unexpected identities | user.groups contains system:masters | Certificate-based access that RBAC cannot see or stop |
| Impersonation of privileged subjects | impersonatedUser present | Expected for admin workflows; unexpected sources need triage |
| Token minting | objectRef.subresource is token on serviceaccounts | A cluster-admin equivalent in use |
| Role widening | Update or patch of clusterroles adding * or the bind and escalate verbs | Silent route to superuser without touching cluster-admin |
Requests made through nodes/proxy reach the kubelet directly, and Kubernetes notes they bypass API server audit logging, so the permission itself must be audited in step 3 rather than detected later.
Small cluster or large fleet
One cluster can be audited by hand with the commands above in under an hour. A fleet needs the same queries run from a central job against every cluster, results stored per cluster, and policy enforced through a common admission controller configuration. Fleet owners should also standardise how cloud admin access is granted (one EKS access policy pattern, local accounts disabled on every AKS cluster) so the cloud layer is checked once per pattern, not per cluster.
Metrics
| Metric | Target |
|---|---|
| Non-default subjects with cluster-admin per cluster | Break-glass only |
Service accounts with '*' '*' access | Zero, or documented system components |
| Clusters with AKS local accounts enabled | Zero |
| Unreviewed new cluster-admin bindings | Zero; each alert triaged within a day |
Outstanding system:masters certificates outside break-glass | Zero |
Common failure patterns
- Auditing bindings and ignoring certificates: a kubeconfig with a
system:masterscertificate on a laptop survives every RBAC clean-up. - Ignoring the cloud layer: EKS access policies and GKE IAM can grant full control while the cluster's RBAC looks clean.
- Only searching for the name: a custom ClusterRole with wildcards, or
bindon clusterroles, is cluster-admin under another name. - Leaving admin dashboards exposed: powerful in-cluster consoles become the shortest route to the cluster. The Tesla Kubernetes cryptojacking incident began with an administrative console reachable without a password.
- Deleting before replacing: removing a controller's binding without a scoped replacement causes an outage and the binding comes back wider.
Framework mapping
| Framework | Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev 5 | AC-6(5) Privileged Accounts; AC-6(7) Review of User Privileges | Restrict and review superuser access |
| NIST SP 800-53 Rev 5 | AC-2 Account Management | Owned, justified subjects including service accounts |
| NIST CSF 2.0 | PR.AA-05 | Permissions managed and reviewed with least privilege |
| MITRE ATT&CK | T1098.006 Additional Container Cluster Roles | Detect new cluster-admin bindings used for persistence |
| MITRE ATT&CK | T1609 Container Administration Command; T1552.007 Container API | What a stolen cluster-admin credential enables |
Practitioner checklist
- Back up all RBAC objects before any change.
- List ClusterRoleBindings and RoleBindings to cluster-admin.
- Find wildcard roles and the bind, escalate, impersonate and token permissions.
- Confirm effective access with
kubectl auth can-ifor each subject. - Review EKS access policies, AKS local accounts and GKE IAM.
- Inventory
system:masterscertificates and plan rotation where needed. - Replace, verify, then delete each unjustified binding.
- Enforce admission rules and alert on new cluster-admin bindings.
Standards and references
- Kubernetes: Using RBAC Authorization
- Kubernetes: Role Based Access Control Good Practices
- Kubernetes: User impersonation
- AWS: Review access policy permissions for Amazon EKS
- AWS CLI Reference: eks list-associated-access-policies
- Microsoft Learn: Manage local accounts with AKS-managed Microsoft Entra integration
- Google Cloud: Authorize actions in clusters using RBAC
Related NHI Mgmt Group resources: Kubernetes RBAC Guide · Kubernetes NHI Security Guide · EKS Identity Hardening Guide · Azure Kubernetes Service Security Hardening Guide