Setting Intra-region Cross-cluster Communication
Last updated: 2019-09-23 18:26:26PDF
Peering Connection is a high-bandwidth and high-quality connectivity service that makes possible communication among Tencent Cloud resources. You can achieve inter-region cross-VPC communication among different clusters through a peering connection.
- This document uses a cluster that has been created and a node that has been added as an example. For more information about how to create a cluster, see Creating a Cluster.
- Please make sure that the peering connection has been successfully established and the servers can communicate with one another. If there is a problem establishing the peering connection, please check whether the console routing table entry, CVM security group, and subnet ACL are correctly set.
- Currently, communication is only supported for clusters over an inter-region peering connection. If you need cross-region communication among containers, please submit a ticket.
Getting Basic Information of a Container
- Log in to the TKE console.
- In the left sidebar, click Clusters to go to the cluster management page.
- Click the ID/name of the cluster where inter-region cross-cluster communication needs to be set to enter the cluster management page. See the figure below:
For example, go to the management page of cluster A.
- In the left sidebar, select "Basic information" to go to the "Basic information" page. See the figure below:
- Record the IP address range and mask of the "Container network" in "Basic information".
- Repeat step 3 to step 5 and record the IP address range and mask of the container network of another cluster.
For example, you can record the IP address range and mask of the container network of cluster B.
Configuring a Routing Table
- Switch to the VPC console.
- In the left sidebar, click Subnet to go to the subnet management page.
- Click the local end of the peering connection and specify the routing table associated with the subnet. See the figure below:
- On the "Default details" page of the associated routing table, click + Create a routing policy.
- In the "Create a route" window that pops-up, set the routing information. Main parameters include:
- Destination: Enter the IP address range of cluster B container.
- Next hop type: Select "Peering connection".
- Next hop: Select the established peering connection.
- Click OK to complete the configuration of the routing table of the local end.
- Repeat step 2 to step 6 to complete the configuration of the routing table of the opposite end.
Containers can communicate with one another. For the login method of the container, see Basic Operations of a Remote Terminal.
- Log in to the container of cluster A and access the container of cluster B from there. See the figure below:
- Log in to the container of cluster B and access the container of cluster A from there. See the figure below: