Skip to main content
Version: v1.6.1

RoleBinding YAML Specification

The RoleBinding kind binds a Role to one or more subjects (users or groups). It defines who receives the permissions in the Role. Without a RoleBinding, a Role has no effect.

Example

apiVersion: datasance.com/v3
kind: RoleBinding
metadata:
name: developers-binding
roleRef:
kind: Role
name: developer-role
apiGroup: datasance.com/v3
subjects:
- kind: User
name: alice
- kind: Group
name: developers

Fields

FieldDescription
metadata.nameUnique name for the RoleBinding.
roleRefReference to the Role to bind. Required.
roleRef.kindKind of the referenced resource (e.g. Role).
roleRef.nameName of the Role.
roleRef.apiGroupAPI group of the Role (e.g. datasance.com/v3).
subjectsArray of subjects that receive the Role's permissions.
subjects[].kindEither User or Group.
subjects[].nameKeycloak username or group (controller client role).
subjects[].apiGroupOptional API group.

Deploy with potctl deploy -f role-binding.yaml. For Keycloak integration and REST API, see Security – Role Bindings.

Group 3See anything wrong with the document? Help us improve it!