---
name: openshift-cluster-access-private-vpc
title: Accessing VPC clusters through the private cloud service endpoint
description: For Red Hat OpenShift VPC clusters that have only the private cloud service endpoint enabled, you must be connected to the VPC private network through a VPN or IBM Cloud Direct Link connection to access the cluster.
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 VPC clusters through the private cloud service endpoint
{: #access-private-vpc}

For Red Hat OpenShift VPC clusters that have only the private cloud service endpoint enabled, you must be connected to the VPC private network through a VPN or IBM Cloud Direct Link connection to access the cluster.
{: shortdesc}

## Before you begin
{: #access-private-vpc-prereqs}

1. [Install the required CLI tools](https://cloud.ibm.com/docs/openshift?topic=openshift-cli-install&format=markdown).
1. Set up one of the following connections to the VPC private network.
   - [Client-to-site VPN](https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-client-to-site-overview&format=markdown)
   - [Site-to-site VPN](https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-onprem-example&format=markdown)
   - [IBM Cloud Direct Link](https://cloud.ibm.com/docs/dl?topic=dl-get-started-with-ibm-cloud-dl&format=markdown)
1. Verify your cluster is healthy: `ibmcloud oc cluster get -c CLUSTER_NAME_OR_ID`.

## Accessing a private VPC cluster from the CLI
{: #access-private-vpc-cli}

1. Connect to your VPC private network using your VPN or Direct Link connection.
1. Set the cluster context using the private endpoint.
   ```sh
   ibmcloud oc cluster config -c CLUSTER_NAME_OR_ID --endpoint private
   ```
   {: pre}

1. Log in to the cluster.
   - **As admin**: `ibmcloud oc cluster config -c CLUSTER_NAME_OR_ID --admin --endpoint private`
   - **With a passcode**: `oc login -u passcode -p <iam_passcode> --server=<private_master_URL>`
   - **With an API key**: See [Accessing clusters from automation tools](https://cloud.ibm.com/docs/openshift?topic=openshift-cluster-access-automation&format=markdown).

1. Verify access.
   ```sh
   oc version
   ```
   {: pre}

## Accessing through the Virtual Private Endpoint (VPE) gateway
{: #access-private-vpc-vpe}

VPC clusters also support access through a VPE gateway. See [Accessing VPC clusters through the Virtual Private Endpoint gateway](https://cloud.ibm.com/docs/openshift?topic=openshift-cluster-access-vpe&format=markdown).