Creating a VPC Endpoint Service
Scenarios
- Gateway VPC endpoint services are configured by the system only for cloud services.
- Interface VPC endpoint services can be configured for cloud services or private services. Cloud services are configured as interface VPC endpoint services by the system by default. However, private services must be configured as interface VPC endpoint services by users.
This section describes how to configure a private service as an interface VPC endpoint service.
Constraints
- VPC endpoint services are region-level resources. Select a region and project when you create such a service.
- A maximum of 100 VPC endpoint services can be created in a region.
- The following private services can be configured as VPC endpoint services:
- Elastic load balancer: works well for services that need to handle heavy traffic and require strong reliability and effective disaster recovery.
- ECS: serves as a server.
- BMS: serves as a server.
- A VPC endpoint service can have only one backend resource.
- If a Layer 7 load balancer is configured as a backend resource, Proxy Protocol must be disabled.
Procedure
- Go to the VPC endpoint service list page.
- Click Create VPC Endpoint Service.
The Create VPC Endpoint Service page is displayed.
- Configure parameters by referring to Table 1.
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 low network latency and quick resource access, select the nearest region.
Name (Optional)
Specifies the name of the VPC endpoint service.
The name can contain a maximum of 16 characters, including letters, digits, underscores (_), and hyphens (-).
- If you do not enter a name, the system generates a name in {region}.{service_id} format.
- If you enter a name, the system generates a name in {region}.{Name}.{service_id} format.
VPC
Specifies the VPC where the VPC endpoint service is to be deployed.
Service Type
Specifies the type of the VPC endpoint service.
The default value is 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 Accepting or Rejecting the Access from a VPC Endpoint.
Backend Resource Type
Specifies the type of the backend resource that provides services to be accessed.
The following backend resource types are supported:
- Elastic load balancer: works well for services that need to handle heavy traffic and require strong reliability and effective disaster recovery.
- ECS: serves as a server.
- BMS: serves as a server.
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, to allow inbound traffic. For details, see 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 there is a rule that allows traffic from 198.19.128.0/17.
Load Balancer
Specifies the load balancer that will provide services. When Backend Resource Type is set to Elastic load balancer, select a load balancer from the drop-down list.
NOTE:If a load balancer is used as the backend resource, the client IP address cannot be obtained.
ECS
This parameter is available when you select ECS for Backend Resource Type. Select an ECS from the ECS list.
BMS
This parameter is available when you select BMS for Backend Resource Type. Select a BMS from the BMS list.
NOTE:The BMS type will be discarded. Use load balancers as backend resources instead.
Port Mapping
Specifies the protocol and ports used for communications between the VPC endpoint service and a VPC endpoint. The protocol can be TCP.
- Service Port: a port used by the VPC endpoint service to provide services.
- Endpoint Port: a VPC endpoint port for you to access a VPC endpoint service.
The service and endpoint 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 endpoint port.
Tag (Optional)
Specifies the VPC endpoint service tag, which consists of a key and a value. You can add up to 20 tags to each VPC endpoint service.
Tag keys and values must meet the requirements listed in Table 2.
NOTE:If a predefined tag has been created on TMS, you can directly select the corresponding tag key and value.
For details about predefined tags, see Predefined Tag Overview.
Description (Optional)
Provides supplementary information about the VPC endpoint service.
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 128 characters.
- Can contain letters, digits, spaces, and the following characters: _.:=+-@. It cannot start or end with a space, or start with _sys_.
Tag value
- Can be left blank.
- Can contain a maximum of 255 characters.
- Can contain letters, digits, spaces, and the following characters: _.:/=+-@. It cannot start or end with a space.
- Click Create Now.
- Return to the VPC endpoint service list and check the new VPC endpoint service.
FAQ
- Why Can't a Service User Query a Created VPC Endpoint Service?
Check whether the service user and the created VPC endpoint service belong to the same Huawei Cloud account. If they do not belong to the same account, add the HUAWEI ID of the service user to the whitelist of the created VPC endpoint service.
- What Should I Do If the VPC Endpoint I Purchased Cannot Connect to a VPC Endpoint Service?
- Confirm that the security group of the ECS NIC is correctly configured.
- On the ECS details page, view the security group details.
- Check whether the security group permits IP addresses in the 198.19.128.0/17 CIDR block in the inbound direction. If it does not, add inbound rules for this CIDR block based on service requirements.
- Confirm that the network ACL of the subnet used by the ECS NIC does not block traffic.
If you can configure the network ACL on the left part of the VPC console, confirm that the subnet of the associated VPC endpoint allows traffic to pass through.
- 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.
- Confirm that the security group of the ECS NIC is correctly configured.