mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
53 lines
1.5 KiB
Plaintext
53 lines
1.5 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * rosa_learning/creating_cluster_workshop/learning-getting-started-admin-rights.adoc
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="learning-getting-started-admin-rights-cli_{context}"]
|
|
= Using the {rosa-cli}
|
|
|
|
[role="_abstract"]
|
|
You can use the {rosa-cli} to grant your user roles administrative access.
|
|
|
|
.Procedure
|
|
. Assuming you are the user who created the cluster, run one of the following commands to grant admin privileges:
|
|
+
|
|
* For `cluster-admin`:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ rosa grant user cluster-admin --user <idp_user_name> --cluster=<cluster-name>
|
|
----
|
|
+
|
|
* For `dedicated-admin`:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ rosa grant user dedicated-admin --user <idp_user_name> --cluster=<cluster-name>
|
|
----
|
|
|
|
. Verify that the admin privileges were added by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ rosa list users --cluster=<cluster-name>
|
|
----
|
|
+
|
|
*Example output*:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ rosa list users --cluster=my-rosa-cluster
|
|
ID GROUPS
|
|
<idp_user_name> cluster-admins
|
|
----
|
|
|
|
. If you are currently logged into the {hybrid-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.
|
|
+
|
|
image:cloud-experts-getting-started-admin-rights-admin-panel.png[]
|
|
|
|
. 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.
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get all -n openshift-apiserver
|
|
---- |