May 2018
Intermediate to advanced
554 pages
13h 51m
English
The concept of role-based access control is surrounded by Role, ClusterRole, RoleBinding, and ClusterRoleBinding. By role.yaml and rolebinding.yaml, as we showed previously, Linda should get read-only access to the configmaps resource. To apply authorization rules to chloe-k8scookbook@gmail.com, simply associate a ClusterRole and ClusteRoleBinding with it:
# cat oidc_clusterrole.yamlkind: ClusterRoleapiVersion: rbac.authorization.k8s.io/v1metadata: name: oidc-admin-rolerules: - apiGroups: ["*"] resources: ["*"] verbs: ["*"]---kind: ClusterRoleBindingapiVersion: rbac.authorization.k8s.io/v1metadata: name: admin-bindingsubjects: - kind: User name: chloe-k8scookbook@gmail.com apiGroup: rbac.authorization.k8s.io ...