In a complex system such as Kubernetes, authorization mechanisms are used to set who is allowed to make what changes to the cluster resources and manipulate them. Role-based access control (RBAC) is a mechanism that's highly integrated into Kubernetes that grants users and applications granular access to Kubernetes APIs.
As good practice, you should use the Node and RBAC authorizers together with the NodeRestriction admission plugin.
In this section, we will cover getting RBAC enabled and creating Roles and RoleBindings to grant applications and users access to the cluster resources.
Getting ready
Make sure you have an RBAC-enabled Kubernetes cluster ready (since Kubernetes 1.6, RBAC is enabled by default) and that kubectl and helm have been configured so that you can manage the cluster resources. Creating private keys will also require that you have the openssl tool before you attempt to create keys for users.
Clone the k8sdevopscookbook/src...