...

/

Creating RoleBindings

Creating RoleBindings

Create a Role Binding to let the user have viewing access to all the objects in our default Namespace.

Creating RoleBindings

RoleBindings bind a user (or a group, or a service Account) to a Role (or a ClusterRole). Since John wants more visibility to our cluster, we’ll create a RoleBinding that will allow them to view (almost) all the objects in the default namespace. That should be a good start of our quest to give John just the right amount of privileges.

Press + to interact
kubectl create rolebinding jdoe \
--clusterrole view \
--user jdoe \
--namespace default \
--save-config
kubectl get rolebindings

We create a RoleBinding called jdoe. Since the ClusterRole view already provides what we need we use that instead of ...

Access this course and 1400+ top-rated courses and projects.