Introduction
In Kubernetes, you need to control who can do what inside your cluster. Roles and ClusterRoles help you set these permissions safely. They let you decide which users or apps can access or change resources.
When you want to allow a user to only read pods in a specific namespace without giving full access.
When you need to let a service account create deployments across all namespaces.
When you want to restrict access so a user can only update config maps in one namespace.
When you want to give cluster-wide permissions to monitor nodes and system components.
When you want to separate permissions for different teams working in different namespaces.