Accessing VPC clusters through the private cloud service endpoint
For VPC clusters, the private service endpoint can be accessed from anywhere inside IBM Cloud, or from a client connected to the VPC private network through a VPN or IBM Cloud Direct Link connection.
Before you begin
- Install the required CLI tools.
- Set up one of the following connections to the VPC private network.
- Verify your cluster is healthy:
ibmcloud ks cluster get -c CLUSTER_NAME_OR_ID.
Accessing a private VPC cluster from the CLI
For regions other than ca-mon, in-che, and in-mum, the private service endpoint can be accessed from anywhere inside IBM Cloud, or from a client using a VPN to connect to IBM Cloud.
The private service endpoint URL for a cluster looks like c<XXX>.private.<REGION>.containers.cloud.ibm.com:XXXXX. Use the following command to get a kubeconfig that uses this private endpoint.
-
Download the kubeconfig for the cluster using the private endpoint.
Log in as admin:
ibmcloud ks cluster config -c CLUSTER_NAME_OR_ID --admin --endpoint privateLog in as user:
ibmcloud ks cluster config -c CLUSTER_NAME_OR_ID --endpoint private -
Verify the connection.
kubectl get nodes
Accessing through the Virtual Private Endpoint (VPE) gateway
VPC clusters also support access through a VPE gateway, which is available from inside the VPC or via a VPN into that specific VPC. See Accessing VPC clusters through the Virtual Private Endpoint gateway.