| copyright |
|
||
|---|---|---|---|
| lastupdated | 2026-08-19 | ||
| keywords | openshift, clusters, access, public, endpoint, console, cli, login | ||
| subcollection | openshift |
{{site.data.keyword.attribute-definition-list}}
{: #cluster-access-public}
For {{site.data.keyword.redhat_openshift_notm}} Classic and VPC clusters that have a public cloud service endpoint enabled, you can log in from the {{site.data.keyword.cloud_notm}} console or the CLI. {: shortdesc}
{: #access-public-prereqs}
- Install the required CLI tools.
- If your network is protected by a company firewall, allow access to the required API endpoints and ports.
- Verify your cluster is healthy:
ibmcloud oc cluster get -c CLUSTER_NAME_OR_ID.
{: #access-public-console}
- In the {{site.data.keyword.cloud_notm}} console{: external}, navigate to your cluster.
- Click {{site.data.keyword.redhat_openshift_notm}} web console.
- To continue in the CLI, click your profile name, then click Copy Login Command.
- Click Display Token, copy the
oc logincommand, and paste it into your terminal.
Log out of both the {{site.data.keyword.cloud_notm}} console and the {{site.data.keyword.redhat_openshift_notm}} web console before closing your browser. You must complete both steps to successfully log out. {: note}
{: #access-public-cli}
Choose one of the following options.
{: #access-public-cli-admin}
Run the following command to download the TLS certificates and set the cluster context. Requires the Administrator platform access role.
ibmcloud oc cluster config -c CLUSTER_NAME_OR_ID --admin{: pre}
{: #access-public-cli-passcode}
- Get the master URL:
ibmcloud oc cluster get -c CLUSTER_NAME_OR_ID - Open https://iam.cloud.ibm.com/identity/passcode{: external} and copy your one-time passcode.
- Log in to the cluster.
{: pre}
oc login -u passcode -p <iam_passcode> --server=<master_URL>
{: #access-public-cli-apikey}
See Accessing clusters from automation tools by using an API key.