This section describes how to find the cluster where the Hosted Che workspace is running with a query to the OpenShift API on Hosted Che.

Prerequisites
  • The curl and jq packages are installed

  • Make a note of the username or email credential that the user used to log into Hosted Che

Procedure
  1. Find the cluster name using the username.

    $ curl -sgSL "https://api.openshift.io/api/users?filter[username]=<username>" | jq -r ".data[0].attributes.cluster"
  2. Find the cluster name using the email.

    $ curl -sgSL "https://api.openshift.io/api/users?filter[email]=<email>" | jq -r ".data[0].attributes.cluster"

The output of the query is the OpenShift Online cluster URL

+ .Example

https://api.starter-us-east-2.openshift.com/
  1. Browse to the previously retrieved URL.

  2. Log in using the OpenShift Online credentials.

The Openshift Console is displayed.

The <username>-che namespace where all the workspace related pods are created are accessible in read-only mode.

+ image::/che/docs/images/hosted-che/finding-the-cluster-where-the-hosted-che-workspace-is-running.png[]