Updated on 2023-12-20 GMT+08:00

Step 1: Create a VPC Endpoint Service

Scenarios

To enable communications across two VPCs, you first need to configure a cloud resource (backend resource) in one VPC as a VPC endpoint service.

This section describes how to create a VPC endpoint service by selecting an elastic load balancer as an example backend service in VPC 2 using B.

Prerequisites

There is a load balancer in the VPC where you are going to create the VPC endpoint service.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select the required region and project.
  3. Click Service List and choose Networking > VPC Endpoint.
  1. In the navigation pane on the left, choose VPC Endpoint > VPC Endpoint Services. In the upper right corner, click Create VPC Endpoint Service.

    The Create VPC Endpoint Service page is displayed.

  2. Configure required parameters.
    Table 1 Parameters for creating a VPC endpoint service

    Parameter

    Description

    Region

    Specifies the region where the VPC endpoint service is to be deployed.

    Resources in different regions cannot communicate with each other over an intranet. For lower latency and quicker access, select the nearest region.

    VPC

    Specifies the VPC where the VPC endpoint service is to be deployed.

    Service Type

    Specifies the type of the VPC endpoint service. The type can only be Interface.

    Connection Approval

    Specifies whether the connection between a VPC endpoint and a VPC endpoint service requires approval from the owner of the VPC endpoint service.

    You can enable or disable Connection Approval.

    When Connection Approval is enabled, any VPC endpoint for connecting to the VPC endpoint service needs to be approved. For details, see step 7.

    Port Mapping

    Specifies the protocol and ports used for communications between the VPC endpoint service and a VPC endpoint. The protocol is TCP.

    • Service Port: provided by the backend resource bound to the VPC endpoint service.
    • Terminal Port: provided by the VPC endpoint, allowing you to access the VPC endpoint service.

    The service and terminal port numbers range from 1 to 65535. A maximum of 50 port mappings can be added at a time.

    NOTE:

    Accessing a VPC endpoint service from a VPC endpoint is to access the service port from the associated terminal port.

    Backend Resource Type

    Specifies the backend resource that provides services to be accessed.

    The following backend resource types are supported:

    • Elastic load balancer: Backend resources of this type suit services that receive high access traffic and demand high reliability and disaster recovery (DR) performance.
    • ECS: Backend resources of this type serve as servers.
    • BMS: Backend resources of this type serve as servers.
    In this example, select Elastic load balancer.
    NOTE:
    • For the security group associated with the backend resource configured for the VPC endpoint service, add an inbound rule, with Source set to 198.19.128.0/17. For details, see section "Adding a Security Group Rule" in the Virtual Private Cloud User Guide.
    • If you configure a load balancer as the backend resource for the VPC endpoint service, and enable access control for the listener associated with the load balancer, ensure to allow traffic from 198.19.128.0/17.

    Load Balancer

    When Backend Resource Type is set to Elastic load balancer, select the load balancer that provides services from the drop-down list.

    NOTE:

    If an elastic load balancer is used as the backend resource, the source IP address received by the VPC endpoint service is not the real address of the client.

    Tag

    This parameter is optional.

    Specifies the VPC endpoint service tag, which consists of a key and a value. You can add up to 10 tags to each VPC endpoint service.

    Tag keys and values must meet requirements listed in Table 2.

    Table 2 Tag requirements for VPC endpoint services

    Parameter

    Requirement

    Tag key

    • Cannot be left blank.
    • Must be unique for each resource.
    • Can contain a maximum of 36 characters.
    • Cannot start or end with a space or contain special characters =*<>\,|/

    Tag value

    • Cannot be left blank.
    • Can contain a maximum of 43 characters.
    • Cannot start or end with a space or contain special characters =*<>\,|/
  3. Click Create Now.
  4. Click Back to VPC Endpoint Service List to view the newly-created VPC endpoint service.
  5. In the VPC endpoint service list, locate the target VPC endpoint service and click its name to view its details.