All Tools View Categories About Contact Privacy

Role and RoleBinding YAML Generator

Build a valid Kubernetes Role and RoleBinding (rbac.authorization.k8s.io/v1) - rules with apiGroups, resources and verbs, plus subjects.

Runs entirely in your browser - nothing is uploaded and no cluster connection is made.
0
rules
0
subjects
Your generated Role and RoleBinding YAML will appear here.

About Role and RoleBinding YAML Generator

RBAC in Kubernetes is built from a Role (which grants permissions) and a RoleBinding (which attaches that Role to subjects). The Role and RoleBinding YAML Generator writes both documents in one file so you do not have to recall the rbac.authorization.k8s.io/v1 schema.

You set the Role name and namespace, then list one or more rules. Each rule names the apiGroups, resources and verbs it allows - entered one rule per line as apiGroups|resources|verbs. You then set the RoleBinding name and subjects, one per line as kind|name|namespace, where kind is User, Group or ServiceAccount. The tool wires up the roleRef automatically. The resulting YAML is valid rbac.authorization.k8s.io/v1.

Names are validated as RFC 1123 labels, at least one rule and one subject are required, and each rule needs resources and verbs. Problems are reported in a clear panel. Everything runs locally and nothing is uploaded.

Features

  • Role - name, namespace and label-based permissions.
  • Rules - one per line as apiGroups|resources|verbs.
  • RoleBinding - name and roleRef wired to the Role.
  • Subjects - one per line as kind|name|namespace.
  • rbac.authorization.k8s.io/v1 - correct schema.
  • Validation - RFC 1123 names, rules and subjects.
  • Copy / Download / Print - get role-rolebinding.yaml wherever you need it.

How to Use

  1. Name the Role. Type a valid RFC 1123 name in its namespace.
  2. Add rules. One per line: apiGroups|resources|verbs (empty apiGroup = core).
  3. Set the binding name and subjects. kind|name|namespace per line.
  4. Watch the preview and export.

Examples

Example 1 - pods read. rule ""|pods|get,list,watch bound to a ServiceAccount.

Example 2 - configmaps. rule ""|configmaps|get,list,watch,update.

Example 3 - apps group. rule apps|deployments|get,list,watch,create.

Example 4 - user subject. User|alice|.

Example 5 - group subject. Group|devs|.

Benefits

  • Correct schema - valid rbac.authorization.k8s.io/v1 Role + RoleBinding.
  • Line-based rules - easy multi-rule input.
  • Auto roleRef - binding points at the Role.
  • Validated - names, rules and subjects checked.
  • Private - everything runs in the browser.
  • Copy, download or print - get the manifest where you need it.

Frequently Asked Questions

What does this tool generate?
It emits two documents in one file: a Role that grants permissions, and a RoleBinding that attaches that Role to one or more subjects (users, groups or service accounts).
What is an apiGroup?
Each resource lives in an API group. Core resources like pods use an empty group ""; others such as apps, batch or networking.k8s.io use their name.
What are resources and verbs?
resources are the objects (pods, services, configmaps) and verbs are the actions (get, list, watch, create, update, delete). Use commas to list several.
What are subjects?
They are who the Role is bound to: a User, a Group, or a ServiceAccount. Each subject also has a name, and ServiceAccounts need a namespace.
Is the name validated?
Yes. Both the Role and RoleBinding names must be valid RFC 1123 labels (lowercase letters, numbers and hyphens).
Does this connect to a cluster?
No. Everything is assembled in your browser and nothing is uploaded.
Can I download it?
Yes. Copy the YAML, download role-rolebinding.yaml, or print it.