This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.2.3. Granting user permissions using web console
This procedure shows how to grant users permissions for monitoring their own services using the web console.
Prerequisites
- Have a user created.
- Log in to the web console as a cluster administrator.
Procedure
-
In the web console, navigate to User Management
Role Bindings Create Binding. - In Binding Type, select the "Namespace Role Binding" type.
- In Name, enter a name for the binding.
-
In Namespace, select the namespace where you want to grant the access. For example, select
ns1. In Role Name, enter
monitoring-rules-view,monitoring-rules-edit, ormonitoring-edit.-
monitoring-rules-viewallows readingPrometheusRulecustom resources within the namespace. -
monitoring-rules-editallows creating, modifying, and deletingPrometheusRulecustom resources matching the permitted namespace. -
monitoring-editgives the same permissions asmonitoring-rules-edit. Additionally, it allows creating scraping targets for services or pods. It also allows creating, modifying, and deletingServiceMonitorandPodMonitorresources.
重要Whichever role you choose, you must bind it against a specific namespace as a cluster administrator.
For example, enter
monitoring-edit.-
- In Subject, select User.
-
In Subject Name, enter the name of the user. For example, enter
johnsmith. -
Confirm the role binding. If you followed the example, then user
johnsmithhas been assigned the permissions for setting up metrics collection and creating alerting rules in thens1namespace.