VPC Peering Connection
A VPC peering connection is a network connection between two VPCs. Users in two VPCs can use private IP addresses to communicate with each other as if the two VPCs were on the same network. To enable two VPCs to communicate with each other, create a VPC peering connection between the two VPCs. You can create a VPC peering connection between the VPC where your created exclusive CS cluster is located and another VPC that is in the same region as the VPC. If you have established an ECS instance on the ECS server when using CS, you can click to connect the created CS clusters to the ECS instance.
Prerequisites
- You have created an exclusive cluster.
- You have information about the peer VPC.
Establishing a VPC Peering Connection Between Two VPCs of an Account
- In the navigation tree on the left pane of the CS management console, click Cluster Management to switch to the page.
- In the row of the cluster you want to query, click the cluster name in the Name column to switch to the cluster details page. Click the tab. Figure 1 VPC peering connection
- Click Create VPC Peering Connection. In the displayed Create VPC Peering Connection dialog box, specify parameters as follows: Figure 2 Creating a VPC peering connection for the current account
- Name: Enter a VPC peering connection name.
- Tenant: Select Current Tenant.
- Peer VPC: Select the target peer VPC from the drop-down list box.
- Accept Request: Choose whether to accept the request for the VPC peering connection. By default, the request is accepted.
- Click OK. The page is displayed.
- (Optional) If you chose to not accept the request for the VPC peering connection in 3, locate the row where the VPC peering connection you created is located and click Accept Request in the Operation column. If you chose to accept, skip this step.
- After the status of the VPC peering connection becomes Accepted, click Add Route. In the displayed dialog box, specify parameters in Local Route and Peer Route, and click OK. Figure 3 Adding a route
- Parameters Destination in Local Route and Peer Route have been automatically set by the system. Generally, retain the default values. If there are custom requirements, modify them as required.
- You can click View Peer VPC or View Local VPC to view details about the peer or local VPC.
- After a VPC peering connection is created, you can run the job used for accessing ECSs in the peer VPC in the current cluster. However, ECS security groups may have different configurations and you may not be allowed to access ports on the peer end. In this case, configure the security group rule of the corresponding ECS and add rules on corresponding ports in inbound and outbound directions. For details about how to configure the security group rule for an ECS, see Configuring a Security Group Rule in the Elastic Cloud Server User Guide.
- CIDRs must not overlap at both ends of a VPC peering connection. During cluster creation, you can configure the VPC network segment where the cluster resides. Ensure that the configured network segment does not conflict with that of the peer end.
- (Optional) If the VPC peering connection is not required, click Delete in the Operation column.
After the VPC peering connection is deleted, communication between CS clusters and the peer end will be interrupted. Exercise caution when deleting a VPC peering connection.
Establishing a VPC Peering Connection Between Two VPCs of Two Accounts
Before establishing a VPC peering connection with the VPC of another account, ensure that you have obtained the project ID and VPC ID of the peer VPC from the peer account.
The following example illustrates how to create a VPC peering connection between VPCs of two different accounts, A and B.
- Log in to the CS management console as account A and create a VPC peering connection with the VPC of account B.
- In the navigation tree on the left pane of the CS management console, click Cluster Management to switch to the page.
- Locate the row where the target cluster is located and click the cluster name in the Name column to switch to the cluster details page. Click .
- Click Create VPC Peering Connection. In the displayed Create VPC Peering Connection dialog box, specify parameters as follows: Figure 4 Creating a VPC peering connection for another account
- Name: Enter a VPC peering connection name.
- Tenant: Select Other Tenant.
- Peer Project ID: Enter the project ID of the peer VPC.
- Peer VPC ID: Enter the peer VPC ID.
- Click OK. The page is displayed. The status of the new VPC peering connection is Awaiting Acceptance.
- Log in to the VPC management console as account B and configure the VPC peering connection.
- In the left navigation pane of the VPC management console, click VPC Peering to switch to the VPC Peering page.
- In the VPC peering connection list, locate the row where the VPC peering connection created in 1 is located and click Accept Request in the Operation column.
After the request is accepted, the status of the VPC peering connection changes to Accepted.
- In the VPC peering connection list, click the name of the VPC peering connection in the VPC Peering Name/ID column to display details about the VPC peering connection.
- Save the Local VPC CIDR Block and Peer VPC CIDR Block settings of the VPC peering connection.
- Click Add Local Route. In the displayed Add Local Route dialog box, specify Destination and click OK.
- Log in to the CS management console as account A.
- Switch to the VPC Peering Connections tab page for the cluster where the new VPC peering connection was created, locate the row where the new VPC peering connection is located, and click the Add Route in the Operation column.
- In the displayed Add Route dialog box, specify Destination and click OK.
- (Optional) If the VPC peering connection is not required, click Delete in the Operation column.
After the VPC peering connection is deleted, communication between CS clusters and the peer end will be interrupted. Exercise caution when deleting a VPC peering connection.
Last Article: Quota Management
Next Article: Audit Log
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.