Skip to main content

More Info:

The cluster-admin role grants unrestricted access and should be bound only where absolutely required. Rebind subjects to lower-privileged roles and remove unnecessary cluster-admin bindings.

Risk Level

Critical

Address

Security

Compliance Standards

  • CIS OKE

Triage and Remediation

Remediation

Manual Steps

  1. List all cluster-admin bindings (any machine with kubectl access)
  2. Inspect each binding’s subjects and usage context
    For each binding name from step 1:
    Review:
    • subjects: kind (User, Group, ServiceAccount), names, namespaces.
    • Any associated namespace or application these subjects belong to (e.g., by matching serviceAccount names to workloads).
  3. Decide if cluster-admin is truly required
    For each subject, answer:
    • Does it need cluster-wide permissions (across all namespaces, nodes, CRDs)?
    • Is it for a human user (often does not need full admin; consider namespace-scoped roles) or a system component (may need elevated but often more targeted rights)?
    • Is it used only for a specific app/namespace/action that could be covered by a custom ClusterRole or namespaced Role instead of cluster-admin?
  4. Design and apply least-privilege alternatives
    Where full cluster-admin is not justified:
    • Identify the minimal API groups, resources, and verbs needed.
    • Create a custom role/clusterrole manifest and apply it:
    • Ensure the new binding targets the same subject(s) (user/group/serviceaccount) as the old cluster-admin binding.
  5. Safely remove unnecessary cluster-admin bindings
    After confirming the replacement role works (e.g., subject can perform required operations but nothing more):
    If unsure, disable in stages (e.g., remove for non-production users first, or test in a staging cluster) before removing in production.
  6. Re-verify cluster-admin usage
    Confirm only justified bindings remain:
    Manually validate each remaining binding is documented and explicitly approved as requiring unrestricted cluster access.
If this prints any names, those bindings grant cluster-admin and must be reviewed.
In the subjects: section, look for:
  • Broad subjects such as:
    • kind: Group with names like system:authenticated, system:serviceaccounts, or any large team group.
    • kind: ServiceAccount without namespace scoping issues (e.g., generic default SAs).
  • Non-essential human users or CI/CD accounts that do not genuinely need full-cluster admin.
These indicate over-privileged access.
Lines where ROLE is cluster-admin and SUBJECT_KIND is a broad group or a non-critical user/service account are likely problematic and should be reviewed for least privilege.
Use this to visually confirm where cluster-admin appears and cross-check against your identity / RBAC design. Any unexpected or legacy bindings here are candidates for replacement with more restrictive roles and eventual deletion.