More Info:
The cluster-admin ClusterRole grants unrestricted access to the entire cluster. It should only be bound to principals that strictly require full administrative control.Risk Level
CriticalAddress
SecurityCompliance Standards
- CIS AKS
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
List all cluster-admin bindings and their subjects
- Run on: any machine with kubectl access
- Command:
- Purpose: identify every
ClusterRoleBindingthat grantscluster-adminand who/what it is bound to (users, groups, service accounts).
-
For each binding, understand what is using it and why
- For each binding name found (e.g.
cluster-admin,aks-cluster-admin-binding, etc.), inspect details: - Map each subject to:
- Human user / group (e.g. corporate IdP group)
- Service account (note its namespace and owning deployment/workload)
- System or add-on component (e.g. CNI, Ingress, monitoring)
- Check your internal documentation, IaC (Helm, Terraform, etc.), or platform docs to see why this binding was created.
- For each binding name found (e.g.
-
Decide if full cluster-admin is strictly necessary for each subject
For each subject in each binding, ask:- Does it require cluster-wide, unrestricted access (e.g. break-glass admin, platform SRE)?
- Is its actual function limited (e.g. namespaced app, read-only monitor, single-namespace operator)?
- Is there a documented support / vendor requirement for
cluster-admin, or can it be scoped down (namespace-scoped or specific API groups/resources/verbs)? - If multiple subjects are in one binding, evaluate each individually; you may need to split them into separate bindings with different roles.
-
Design and apply least-privilege alternatives where possible
- If
cluster-adminis not strictly required, create or reuse a less-privilegedClusterRole/Rolethat matches the real needs. Examples (adapt to your case): - Bind that role to the subject instead of
cluster-admin(adjustkind,name,namespaceas identified in step 2): - For service accounts that only need namespace access, prefer
Role+RoleBindingin that namespace.
- If
-
Remove or narrow the cluster-admin bindings
- After confirming the replacement access works (functional tests, user confirmation, or workload logs), remove or adjust the
cluster-adminbinding:- To completely remove a no-longer-needed binding:
- To keep the binding but drop unnecessary subjects, edit it interactively:
Remove only the subjects that no longer require
cluster-admin, then save.
- To completely remove a no-longer-needed binding:
- For bindings managed by GitOps/IaC, make the equivalent changes in the source manifests instead of editing live objects directly, then apply/sync.
- After confirming the replacement access works (functional tests, user confirmation, or workload logs), remove or adjust the
-
Verify remaining usage of cluster-admin is minimal and intentional
- Run on: any machine with kubectl access
- Command:
- For any remaining bindings, ensure you have documented justification (who, why, and approval) and that they are periodically re-reviewed.
Using kubectl
Using kubectl
Using kubectl
Run these commands from any machine with kubectl access.- List all ClusterRoleBindings that grant
cluster-admin:
cluster-admin (no problem for this check).Any lines returned indicate a binding that must be reviewed.
- View full details of each binding found:
.roleRef.name– must becluster-adminfor this control..subjects– whichUser,Group, orServiceAccountis getting cluster-admin.
- Bindings to broad identities such as:
system:authenticated,system:unauthenticated, or other large groups- Wildcard-like groups used by your IdP (e.g., “AllEmployees”)
- ServiceAccounts in application namespaces (e.g.,
default,dev-*,prod-*) that do not clearly require full cluster control. - External users or groups where a more specific, least-privilege ClusterRole could be used instead.
- (Optional) Quickly list just the subjects of all
cluster-adminbindings:
- ClusterRoleBinding name
- Subject kind (
User,Group,ServiceAccount) - Subject name
- Namespace (
-for non-namespaced subjects)
- Many different subjects listed, especially generic groups.
- Any entry where you cannot clearly justify why that subject needs unrestricted cluster-wide admin access.
Automation
Automation
- Any entry in “ClusterRoleBindings that grant cluster-admin” is potentially risky and must be reviewed.
- Especially suspicious:
- Bindings where
SUBJECTSincludes generic or shared identities such as:Group/system:authenticated,Group/system:serviceaccounts,Group/system:masters(or similar broad groups).- User or group names that look like teams (
devs,qa,ops,developers, etc.) instead of specific admin identities.
- ServiceAccounts in application namespaces (e.g.,
default,prod,staging,app-*) rather than a dedicated admin namespace.
- Bindings where
- The JSON “Summary counts” at the end:
- A
total_clusterrolebindings_using_cluster_admingreater than a very small number (commonly >1–3) warrants closer review. - A large
total_subjectsorby_kindentries with manyUser/Groupsubjects indicate overuse of cluster-admin.
- A

