Does K8S RoleBinding or ClusterRoleBidning support reference using roleRef multiple roles? or do I have to create a binding for each role I want to give the user or group?
According to the documenation, there can be only one roleRef which can reference only one role:
So you have to create a binding for each role you want to give to a given user or group?
kubectl explain RoleBinding
KIND: RoleBinding
VERSION: rbac.authorization.k8s.io/v1
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
...
roleRef <Object> -required-
RoleRef can reference a Role in the current namespace or a ClusterRole in
the global namespace. If the RoleRef cannot be resolved, the Authorizer
must return an error.
subjects <[]Object>
Subjects holds references to the objects the role applies to.