Verifying connectivity to a Private Path service
After you create a Private Path service and its status shows Stable, it's a good idea to test the connection to your service before making the service available to other clients.
You don't need to Publish the service to verify that it works.
Verifying connectivity to a Private Path service in the console
To verify connectivity to a Private Path service from the IBM Cloud console, follow these steps:
-
From your browser, open the IBM Cloud console and log in to your account.
-
Select the Navigation menu
, then click Infrastructure
> Network > Private Path services.
-
Locate your new Private Path in the table and click the name of the service to show its Details page.
-
Copy the CRN to your clipboard.
-
From the Navigation menu
, click Infrastructure
> Network > Virtual private endpoint gateways.
-
Create a VPE gateway using the Cloud Resource Name (CRN) of your Private Path service. For instructions, see Creating a VPE gateway.
Create the VPE gateway in the same account that created the Private Path service. After the service is published, VPE gateways can be created from any account that is authorized to use the service.
-
Go back to the Private Path services for VPC list page and click the name of your Private Path service in the table.
-
In the Connections section:
- If your default policy is set to Permit all requests, your request shows in the Permitted view.
- If your default policy is set to Review all requests, your request shows in the Requests to review view. Permit your connection request.
-
Connect to your service.
-
Verify connectivity to your Private Path service:
- Use SSH to log in to a virtual server instance that is running in the VPC that contains the endpoint gateway.
- Initiate traffic to the VPE service endpoint DNS name or private IP address.
- Confirm that the connection is successful.
Verifying connectivity to a Private Path service from the CLI
The following example shows how to use the CLI to verify connectivity to a Private Path service.
Before you begin, make sure to set up your CLI environment.
To verify connectivity to a Private Path service from the CLI, follow these steps:
-
Create a VPE gateway to connect to your Private Path service by using your Private Path CRN. For instructions, see Creating a VPE gateway from the CLI.
Create the VPE gateway in the same account that created the Private Path service. After the service is published, VPE gateways can be created from any account that is authorized to use the service.
-
Connect to your service.
-
Verify connectivity to your Private Path service:
- Use SSH to log in to a virtual server instance that is running in the VPC that contains the endpoint gateway.
- Initiate traffic to the VPE service endpoint DNS name or private IP address.
- Confirm that the connection is successful.
Verifying connectivity to a Private Path service with the API
To verify connectivity to a Private Path service with the API, follow these steps:
- Follow these instructions to create a VPE with
TargetCrnspecified with your Private Path service CRN. - Make sure that at least one of your load balancer's members health is shown as
ok. - From a virtual server instance in the same VPE's VPC, initiate a request to the VPE's
private IPorservice_endpointand expect to get a reply. For example, SSH into a VSI in the same VPE's VPC with imageibm-ubuntu-18-04-6-minimal-s390x-3. Then, run this command:
export ip=<VPE-private-ip>
export port=<load-balancer-listener-port>
wget http://$ip:$port
Verifying connectivity to a Private Path service with Terraform
The following example verifies connectivity to a Private Path network by using Terraform:
resource "ibm_is_virtual_endpoint_gateway" "endpoint_gateway" {
name = "my-example-egw"
target {
crn = ibm_is_private_path_service_gateway.ppsg.crn
resource_type = "private_path_service_gateway"
}
vpc = ibm_is_vpc.vpc.id
}
For documentation about Terraform resources, see the Terraform Registry.