By default, only cluster administrator users and developers have access to metrics from your services. This procedure shows how to grant metrics access to a particular project to an arbitrary user.
Prerequisites
-
You need to have a user created.
-
You need to log in as a cluster administrator.
Procedure
-
Run this command to give <user> access to all metrics of your services in <namespace>:
$ oc policy add-role-to-user view <user> -n <namespace>
For example, to give view access to the
ns1
namespace to userbobwilliams
, run:$ oc policy add-role-to-user view bobwilliams -n ns1
-
Alternatively, in the Web console, switch to the Developer Perspective, and click Advanced → Project Access. From there, you can select the correct namespace and assign the
view
role to a user.