DemandFlow Support Centre

K8SROLEBINDING: K8s Role Binding

ReferenceEntity Reference16/04/2026Updated 16/04/2026
A Kubernetes RoleBinding or ClusterRoleBinding that grants the permissions defined in a Role or ClusterRole to users, groups, or service accounts.

K8SROLEBINDING: K8s Role Binding

A Kubernetes RoleBinding or ClusterRoleBinding that grants the permissions defined in a Role or ClusterRole to users, groups, or service accounts.

Default definition. This article describes the default K8SROLEBINDING definition shipped with DemandFlow. Administrators can add, remove, rename, or re-type fields, change which ones are required, and alter the layout from the Definitions screen in Settings. Your tenant's current schema may differ from what is shown here. To read the current definition at any time, GET the DEFINITION object whose id matches K8SROLEBINDING.

Entity properties

PropertyValue
Entity codeK8SROLEBINDING
Display nameK8s Role Binding
PluralK8s Role Bindings
Level412

Use cases

K8SROLEBINDING covers both namespace-scoped RoleBindings and cluster-scoped ClusterRoleBindings via the bindingScope field. The role objectLookup references the K8SROLE being granted. Subjects are stored as a JSON array of {kind, name, namespace} objects representing the users, groups, or service accounts receiving the permissions.

Fields

Binding Information

FieldTypeRequiredNotes
nametextYesName
bindingScopeenumYesBinding Scope Valid ids: 1 (RoleBinding), 2 (ClusterRoleBinding).
namespacereference → K8SNAMESPACENamespace
rolereference → K8SROLEYesRole

Metadata

FieldTypeRequiredNotes
labelstext (multi-line)Labels
annotationstext (multi-line)Annotations

Subjects

FieldTypeRequiredNotes
subjectstext (multi-line)JSON array: [{kind: 'User'|'Group'|'ServiceAccount', name: '...', namespace: '...'}]
subjectCountnumberSubject Count Read only.

Summary

FieldTypeRequiredNotes
userSubjectstext (multi-line)Users Read only.
groupSubjectstext (multi-line)Groups Read only.
saSubjectstext (multi-line)Service Accounts Read only.

Relationships

  • Lookups: namespace points at a K8SNAMESPACE record. role points at a K8SROLE record.

Creating a K8s Role Binding via the API

POST /v1/objects
Authorization: Bearer <your-pat>
Content-Type: application/json

{
  "entity":   "K8SROLEBINDING",
  "level":    412,
  "comboKey": "SUB:<your-sub-id>|ENT:",
  "name": "Example",
  "bindingScope": "1",
  "role": ""
}

Listing K8s Role Bindings records

# All k8s role bindings in your tenant
GET /v1/entities/K8SROLEBINDING/SUB

See also

k8srolebindingk8srolebindingbindingsentity reference

Was this article helpful?

← Back to Knowledge Base