Accessing your cluster
Accessing the cluster#
There are multiple ways to interact with your cluster. You can connect to it via the CLI or via the Web Console. We will review both options below.
Accessing the cluster via the Web Console#
Enter the console URL into your web browser. If you need to retrieve it you can run:
rosa describe cluster -c <cluster-name> | grep Console
Click on your IdP. In the guide we created “rosa-github”.
Enter your GitHub user credentials (or other credentials if not using GitHub)
You should be logged in. If you've followed this guide in order, you will be a cluster-admin and should see a web console like the following with the "Administrator" panel visible.
Accessing the cluster via the CLI#
In order to access the cluster via the CLI you must have the
oc CLI installed. Which, if you followed the previous steps, you already have.
- Log into the web console as stated above.
- Click on your username in the top right corner
Click on “Copy Login Command”
This will open a new tab with a choice of IdP. Click on the IdP you want to use, in our case, “rosa-github”.
- A new tab will open, Click on “Display token”.
You will see a page like the following
oc logincommand and paste it into your terminal. Press enter
$ oc login --token=sha256~GBAfS4JQ0t1UTKYHbWAK6OUWGUkdMGz000000000000 --server=https://api.my-rosa-cluster.abcd.p1.openshiftapps.com:6443 Logged into "https://api.my-rosa-cluster.abcd.p1.openshiftapps.com:6443" as "rosa-user" using the token provided. You have access to 79 projects, the list has been suppressed. You can list all projects with ' projects' Using project "default".
We can confirm that we are now the user we logged in with by running
$ oc whoami rosa-user
We can start using our cluster.