Description

RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.

Type

object

Required
  • roleRef

Specification

Property Type Description

.apiVersion

string

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

.kind

string

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

.metadata

ObjectMeta meta/v1

Standard object’s metadata.

.roleRef

object

RoleRef contains information that points to the role being used

.subjects

array

Subjects holds references to the objects the role applies to.

.subjects[]

object

Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.

.roleRef
Description

RoleRef contains information that points to the role being used

Type

object

Required
  • apiGroup

  • kind

  • name

Property Type Description

apiGroup

string

APIGroup is the group for the resource being referenced

kind

string

Kind is the type of resource being referenced

name

string

Name is the name of resource being referenced

.subjects
Description

Subjects holds references to the objects the role applies to.

Type

array

.subjects[]
Description

Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.

Type

object

Required
  • kind

  • name

Property Type Description

apiGroup

string

APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.

kind

string

Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.

name

string

Name of the object being referenced.

namespace

string

Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.