$ rosa grant user cluster-admin --user <idp_user_name> --cluster=<cluster-name>
Administration (admin) privileges are not automatically granted to users that you add to your cluster. If you want to grant admin-level privileges to certain users, you will need to manually grant them to each user. You can grant admin privileges from either the ROSA command line interface (CLI) or the Red Hat OpenShift Cluster Manager web user interface (UI).
Red Hat offers two types of admin privileges:
cluster-admin
: cluster-admin
privileges give the admin user full privileges within the cluster.
dedicated-admin
: dedicated-admin
privileges allow the admin user to complete most administrative tasks with certain limitations to prevent cluster damage. It is best practice to use dedicated-admin
when elevated privileges are needed.
For more information on admin privileges, see the administering a cluster documentation.
Assuming you are the user who created the cluster, run one of the following commands to grant admin privileges:
For cluster-admin
:
$ rosa grant user cluster-admin --user <idp_user_name> --cluster=<cluster-name>
For dedicated-admin
:
$ rosa grant user dedicated-admin --user <idp_user_name> --cluster=<cluster-name>
Verify that the admin privileges were added by running the following command:
$ rosa list users --cluster=<cluster-name>
$ rosa list users --cluster=my-rosa-cluster
ID GROUPS
<idp_user_name> cluster-admins
If you are currently logged into the Red Hat Hybrid Cloud Console, log out of the console and log back in to the cluster to see a new perspective with the "Administrator Panel". You might need an incognito or private window.
You can also test that admin privileges were added to your account by running the following command. Only a cluster-admin
users can run this command without errors.
$ oc get all -n openshift-apiserver
Log in to the OpenShift Cluster Manager.
Select your cluster.
Click the Access Control tab.
Click the Cluster roles and Access tab in the sidebar.
Click Add user.
On the pop-up screen, enter the user ID.
Select whether you want to grant the user cluster-admins
or dedicated-admins
privileges.