---
name: openshift-cluster-access-public
title: Accessing clusters through the public cloud service endpoint
description: For Red Hat OpenShift Classic and VPC clusters that have a public cloud service endpoint enabled, you can log in from the IBM Cloud console or the CLI.
last-updated: 2026-08-11
---

> ## Documentation Index
> The table of contents for this documentation set is at https://cloud.ibm.com/docs/openshift?format=markdown
> The index for all IBM Cloud docs is at: https://cloud.ibm.com/docs/llms.txt
> Use these files to discover more information as needed.

# Accessing clusters through the public cloud service endpoint
{: #access-public}

For Red Hat OpenShift Classic and VPC clusters that have a public cloud service endpoint enabled, you can log in from the IBM Cloud console or the CLI.
{: shortdesc}

## Before you begin
{: #access-public-prereqs}

1. [Install the required CLI tools](https://cloud.ibm.com/docs/openshift?topic=openshift-cli-install&format=markdown).
1. If your network is protected by a company firewall, [allow access to the required API endpoints and ports](https://cloud.ibm.com/docs/openshift?topic=openshift-firewall&format=markdown#corporate).
1. Verify your cluster is healthy: `ibmcloud oc cluster get -c CLUSTER_NAME_OR_ID`.

## Connecting from the IBM Cloud console
{: #access-public-console}

1. In the [IBM Cloud console](https://cloud.ibm.com/){: external}, navigate to your cluster.
1. Click **Red Hat OpenShift web console**.
1. To continue in the CLI, click your profile name, then click **Copy Login Command**.
1. Click **Display Token**, copy the `oc login` command, and paste it into your terminal.

Log out of both the IBM Cloud console and the Red Hat OpenShift web console before closing your browser. You must complete both steps to successfully log out.
{: note}

## Connecting from the CLI
{: #access-public-cli}

Choose one of the following options.

### Log in as admin
{: #access-public-cli-admin}

Run the following command to download the TLS certificates and set the cluster context. Requires the **Administrator** platform access role.

```sh
ibmcloud oc cluster config -c CLUSTER_NAME_OR_ID --admin
```
{: pre}

### Log in with a passcode
{: #access-public-cli-passcode}

1. Get the master URL: `ibmcloud oc cluster get -c CLUSTER_NAME_OR_ID`
1. Open [https://iam.cloud.ibm.com/identity/passcode](https://iam.cloud.ibm.com/identity/passcode){: external} and copy your one-time passcode.
1. Log in to the cluster.
   ```sh
   oc login -u passcode -p <iam_passcode> --server=<master_URL>
   ```
   {: pre}

### Log in with an API key
{: #access-public-cli-apikey}

See [Accessing clusters from automation tools by using an API key](https://cloud.ibm.com/docs/openshift?topic=openshift-cluster-access-automation&format=markdown).