A RoleBinding grants a namespace-scoped Role to subjects such as users, groups, or service accounts. The Role defines permitted API groups, resources, and verbs; the binding connects those permissions to identities. section 12.6
Listing 12.14 Chapter12/12.6_RBAC/rolebinding.yaml
kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: developerA namespace: team1 roleRef: kind: Role name: developer-access #1 apiGroup: rbac.authorization.k8s.io subjects: # Google Cloud user account - kind: User name: example@gmail.com #2
This manifest binds the developer-access Role in team1 to the user example@gmail.com. section 12.6
Namespace access in practice
A user bound to developer-access can create a Deployment in team1, but the same operation is forbidden in default. The binding does not allow changing the team1 namespace or creating cluster-scoped resources unless separate permissions are granted.


