Skip to content

Menu

Kubernetes RBAC Explorer

Paste Kubernetes Role, ClusterRole and binding YAML, ask whether a user, group or service account can do a verb, and see risky rules. Runs in your browser.

Runs entirely in your browserDevOpsFree, no sign-up
Loading tool

01What is Kubernetes RBAC Explorer?

Kubernetes RBAC decides access from four object kinds: Role, ClusterRole, RoleBinding and ClusterRoleBinding. Permissions only add up, and there are no deny rules. That sounds simple until a Forbidden error shows up and you have twenty manifests to read. This tool reads those objects from YAML you paste and answers one question at a time. Can this user, group or service account do this verb on this resource in this namespace? If the answer is yes, it lists every binding, role and rule that grants it. It follows the rules in the Kubernetes RBAC docs. A RoleBinding grants access only in its own namespace, even when it points at a ClusterRole. A ClusterRoleBinding grants access in every namespace and on cluster-scoped resources. Subresources use the slash form, so a rule for pods does not cover pods/exec. A rule with resourceNames only matches requests for those names. Non-resource URLs such as /healthz only work through a ClusterRoleBinding, and a trailing * is treated as a prefix match. Service accounts are matched as their own subject, as the system:serviceaccount:namespace:name user, and through the system:serviceaccounts groups. A ClusterRole with an aggregationRule pulls in the rules of every other ClusterRole whose labels match. The tool also scans every role for wildcard verbs, resources and API groups. It flags permissions that act as escalation paths: escalate, bind, impersonate, reading secrets, pods/exec and creating pods. Objects that are not RBAC kinds are skipped with a warning. A Role or RoleBinding without a namespace gets a warning and is treated as being in default. A worked example: the Risky service account sample has a ClusterRole ci-deployer bound by a RoleBinding in staging to the service account ci/deployer. Ask whether it can create pods/exec in staging and the answer is CAN, granted by "RoleBinding staging/ci -> ClusterRole ci-deployer". Ask about reading secrets in prod and the answer is CANNOT, because the binding only covers staging. The risk list still flags four high findings on ci-deployer: secrets read, pods/exec, escalate and bind. Limits: it only sees what you paste, so built-in roles and bindings in a real cluster are ignored. It reads the block YAML style that manifests use, not every YAML feature. aggregationRule is supported for matchLabels only. For a final answer on a live cluster, kubectl auth can-i is still the source of truth. Nothing is sent to a server.

Platform engineers, SREs and security reviewers who read or write Kubernetes RBAC manifests. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Kubernetes RBAC Explorer

  1. Paste one or more Role, ClusterRole, RoleBinding or ClusterRoleBinding objects, separated by ---.
  2. Pick the subject kind and enter its name, plus its namespace for a service account.
  3. Enter the verb, resource, API group and namespace you want to check.
  4. Read the yes or no answer and the list of granting rules.
  5. Review the risky permissions list for every role you pasted.

03Worked examples

Input: Role default/pod-reader (get, watch, list on pods, pods/log) bound to User jane by RoleBinding read-pods. Question: can jane get pods in default?
Result: CAN RoleBinding default/read-pods -> Role default/pod-reader {"apiGroups":[""],"resources":["pods","pods/log"],"verbs":["get","watch","list"],"resourceNames":[],"nonResourceURLs":[]}
Input: Same YAML. Question: can jane get pods in kube-system? And can jane create pods/exec in default?
Result: CANNOT (kube-system) CANNOT (pods/exec)
The RoleBinding only grants access in its own namespace, and pods does not cover the pods/exec subresource.
Input: Risky service account: ClusterRole ci-deployer (secrets and pods/exec with get, list, create; bind and escalate on clusterroles) bound in staging to ServiceAccount ci/deployer. Question: create pods/exec in staging?
Result: CAN RoleBinding staging/ci -> ClusterRole ci-deployer Risks (high): Read access to secrets, which can include service account tokens. / pods/exec lets the subject run commands inside running containers. / "escalate" lets the subject create or edit roles with permissions it does not hold. / "bind" lets the subject bind roles with permissions it does not hold.
The same subject asking for get secrets in prod gets CANNOT.
Input: Aggregated ClusterRole: monitoring aggregates ClusterRoles labeled rbac.example.com/aggregate-to-monitoring=true, bound to Group oncall by a ClusterRoleBinding. Questions: list nodes (cluster-scoped), get /healthz/etcd.
Result: list nodes: CAN via ClusterRoleBinding oncall-monitoring -> ClusterRole monitoring get /healthz/etcd: CAN via the rule nonResourceURLs ["/metrics","/healthz/*"]
The rules come from monitoring-nodes through the aggregationRule. /healthz/* works as a prefix match.
Input: Role app-config-editor with no namespace, resourceNames [app-config] on configmaps, bound to User ci-bot in default, plus a ConfigMap object. Question: update configmaps named app-config?
Result: CAN Warnings: Role "app-config-editor" has no metadata.namespace; assuming "default". / Skipped a ConfigMap object; only RBAC kinds are read.
With the resource name left empty, the same question returns CANNOT.

04Common use cases

  • Check why a service account gets a Forbidden error before you change a role
  • Confirm that a RoleBinding to a ClusterRole is limited to one namespace
  • Review a Helm chart's RBAC for wildcard or secrets access before installing it
  • Find which binding gives a group access to pods/exec
  • Explain RBAC scoping to a teammate with a real example
  • Check that an aggregated monitoring ClusterRole really picks up the rules from its labeled parts
  • Verify that a resourceNames rule lets a CI user update one ConfigMap and nothing else

05Tips

  • Use the resource/subresource form, such as pods/log or pods/exec, when checking subresources.
  • Leave the namespace empty to check a cluster-scoped resource like nodes.
  • Add the user's groups, such as system:authenticated, to include bindings made to groups.
  • Fill in the resource name when a rule uses resourceNames, or the check will say CANNOT.
  • For a final answer on a live cluster, run kubectl auth can-i, which sees every binding.

06Related concepts

RBAC, ClusterRole, RoleBinding, ServiceAccount, least privilege, privilege escalation.

Frequently Asked Questions

What is Kubernetes RBAC Explorer?

Kubernetes RBAC Explorer is a free, browser-based developer tool on AIDToolStack. Paste Kubernetes Role, ClusterRole and binding YAML, ask whether a user, group or service account can do a verb, and see risky rules. Runs in your browser. It requires no installation or sign-up and works entirely in your browser.

Is Kubernetes RBAC Explorer free to use?

Yes. No sign-up, no fees and no usage cap.

Does Kubernetes RBAC Explorer store my data?

No. It runs in your browser; nothing is uploaded.

Cheat sheet

Related Tools

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe