|
| 1 | +:_mod-docs-content-type: ASSEMBLY |
| 2 | +[id="cloud-experts-getting-started-accessing"] |
| 3 | += Tutorial: Accessing your cluster |
| 4 | +include::_attributes/attributes-openshift-dedicated.adoc[] |
| 5 | +:context: cloud-experts-getting-started-accessing |
| 6 | + |
| 7 | +toc::[] |
| 8 | + |
| 9 | +//rosaworkshop.io content metadata |
| 10 | +//Brought into ROSA product docs 2023-11-30 |
| 11 | + |
| 12 | +You can connect to your cluster using the command line interface (CLI) or the console user interface (UI). |
| 13 | + |
| 14 | +== Accessing your cluster using the CLI |
| 15 | + |
| 16 | +To access the cluster using the CLI, you must have the `oc` CLI installed. If you are following the tutorials, you already installed the `oc` CLI. |
| 17 | + |
| 18 | +. Log in to the link:https://console.redhat.com/openshift[Red Hat console]. |
| 19 | +. Click your username in the top right corner. |
| 20 | +. Click *Copy Login Command*. |
| 21 | ++ |
| 22 | +image::cloud-experts-getting-started-accessing-copy-login.png[] |
| 23 | + |
| 24 | +. This opens a new tab with a choice of identity providers (IDPs). Click the IDP you want to use. For example, "rosa-github". |
| 25 | ++ |
| 26 | +image::cloud-experts-getting-started-accessing-copy-token.png[] |
| 27 | + |
| 28 | +. A new tab opens. Click *Display token*. |
| 29 | + |
| 30 | +. Run the following command in your terminal: |
| 31 | ++ |
| 32 | +[source,terminal] |
| 33 | +---- |
| 34 | +$ oc login --token=sha256~GBAfS4JQ0t1UTKYHbWAK6OUWGUkdMGz000000000000 --server=https://api.my-rosa-cluster.abcd.p1.openshiftapps.com:6443 |
| 35 | +---- |
| 36 | ++ |
| 37 | +.Example output |
| 38 | ++ |
| 39 | +[source,terminal] |
| 40 | +---- |
| 41 | +Logged into "https://api.my-rosa-cluster.abcd.p1.openshiftapps.com:6443" as "rosa-user" using the token provided. |
| 42 | +
|
| 43 | +You have access to 79 projects, the list has been suppressed. You can list all projects with ' projects' |
| 44 | +
|
| 45 | +Using project "default". |
| 46 | +---- |
| 47 | + |
| 48 | +. Confirm that you are logged in by running the following command: |
| 49 | ++ |
| 50 | +[source,terminal] |
| 51 | +---- |
| 52 | +$ oc whoami |
| 53 | +---- |
| 54 | ++ |
| 55 | +.Example output |
| 56 | ++ |
| 57 | +[source,terminal] |
| 58 | +---- |
| 59 | +rosa-user |
| 60 | +---- |
| 61 | + |
| 62 | +. You can now access your cluster. |
| 63 | + |
| 64 | +== Accessing the cluster via the web console |
| 65 | +. Log in to the link:https://console.redhat.com/openshift/[Red Hat console]. |
| 66 | +.. To retrieve the console URL run: |
| 67 | ++ |
| 68 | +[source,terminal] |
| 69 | +---- |
| 70 | +rosa describe cluster -c <cluster-name> | grep Console |
| 71 | +---- |
| 72 | + |
| 73 | +. Click your IDP. For example, "rosa-github". |
| 74 | ++ |
| 75 | +image::cloud-experts-getting-started-accessing-copy-token.png[] |
| 76 | + |
| 77 | +. Enter your user credentials. |
| 78 | +. You should be logged in. If you are following the tutorials, you will be a cluster-admin and should see a web console with the *Administrator* panel visible. |
| 79 | ++ |
| 80 | +image::cloud-experts-getting-started-accessing-logged.png[] |
0 commit comments