RBAC stands for role base access control .
k get role
k get rolebindings
k create clusterole –help
–verb –> this is something that sets the permissions in K8s
role.yaml
![](https://www.alddit.com/wp-content/uploads/2023/04/image-18.png)
![](https://www.alddit.com/wp-content/uploads/2023/04/image-22.png)
![](https://www.alddit.com/wp-content/uploads/2023/04/image-19.png)
roles are created now assign roles to users
k create clusterorlebinding –help
rolebinding.yaml
![](https://www.alddit.com/wp-content/uploads/2023/04/image-21.png)
![](https://www.alddit.com/wp-content/uploads/2023/04/image-20.png)
Clusterrolebinding and rolebinding . Cluster role binding is for entire cluser . Cluster role has highest priority . when compare to rolebinding .
Clusterrolebinding will be created by cluster admin
rolebinding will be created by admin [Normal admin ]
checking if a id have some permission .
![](https://www.alddit.com/wp-content/uploads/2023/04/image-23.png)