More Info:
Membership of system:masters grants unrestricted access that bypasses RBAC and cannot be revoked by removing bindings. It should not be used.Risk Level
CriticalAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
List all ClusterRoleBindings that reference
system:masters- Run on: any machine with
kubectlaccess - Command:
- Note the names of any
ClusterRoleBindingobjects wheresubjects[*].kindisGroupandsubjects[*].nameissystem:masters.
- Run on: any machine with
-
Review each identified ClusterRoleBinding in detail
- Run on: any machine with
kubectlaccess - For each binding name found in step 1 (replace
BINDING_NAME): - Record the
metadata.name,subjects, androleReffields, and identify which external identities (e.g., OIDC groups, SSO mappings, user certs) end up insystem:masters.
- Run on: any machine with
-
Identify business need and safer alternatives for each subject
- Outside Kubernetes, review your identity provider / certificate issuance to see why each subject is mapped to
system:masters(e.g., “cluster-admins” IdP group mapped tosystem:masters). - Decide per subject whether they truly need unrestricted cluster-wide admin, or if a scoped
ClusterRole/Role(e.g.,cluster-adminvia RBAC or a custom admin role) is sufficient.
- Outside Kubernetes, review your identity provider / certificate issuance to see why each subject is mapped to
-
Plan and apply RBAC changes to replace
system:mastersuse- If subjects should keep admin rights, bind them to an explicit
ClusterRole(commonlycluster-admin) instead of usingsystem:masters. Example (edit as needed):- Run on: any machine with
kubectlaccess
- Run on: any machine with
- Coordinate with your IdP / certificate configuration so that identities are no longer placed into the
system:mastersgroup going forward.
- If subjects should keep admin rights, bind them to an explicit
-
Remove or edit bindings that reference
system:masters- After confirming replacement access is in place and tested for affected users:
- To remove an entire binding (if it only exists to grant
system:masters): - Or to surgically remove
system:mastersfromsubjects, edit the binding:In the editor, delete anysubjectsentries wherekind: Groupandname: system:masters, then save.
- To remove an entire binding (if it only exists to grant
- After confirming replacement access is in place and tested for affected users:
-
Verify that
system:mastersis no longer used- Run on: any machine with
kubectlaccess - Commands:
- Optionally, have a former
system:mastersmember log in and confirm that their access is now mediated via RBAC bindings you created, not viasystem:masters.
- Run on: any machine with
Using kubectl
Using kubectl
Any ClusterRoleBinding name printed by this command has at least one
subjects entry where:kindisGroup, andnameissystem:masters
system:masters group is being used and need human review.subjects: list. Entries like these are high-risk:system:masters (in your IdP/OS) effectively gets full, non-revocable cluster admin access. Every such usage must be consciously justified or removed.Each line shows a ClusterRoleBinding that directly binds the
system:masters group. Any such binding is a candidate for redesign. Decide, per binding, whether membership in system:masters is truly required or whether a narrower Role/ClusterRole should be used instead.The final message should be
No ClusterRoleBindings reference system:masters. If you see system:masters still in use, there are still bindings that must be reviewed and a decision made on whether to keep or change them.Automation
Automation
-
Any line under:
-
=== Checking ClusterRoleBindings that reference group system:masters ===- e.g.
ClusterRoleBinding: cluster-admin-binding
- e.g.
-
=== Checking RoleBindings (all namespaces) that reference group system:masters ===- e.g.
Namespace: kube-system RoleBinding: ops-admins
- e.g.
system:mastersgroup and should be reviewed and, where possible, replaced with least-privilege RBAC targeting specific users/groups or custom roles. -
-
If both sections print nothing (no ClusterRoleBinding or RoleBinding listed), the cluster has no RBAC bindings directly referencing
system:masters, which is the desired state for this control.

