Setting Cross-region Cross-cluster Communication

Last updated: 2019-09-23 18:28:47

PDF

Operation Scenario

Peering Connection is a high-bandwidth and high-quality connection service that links Tencent Cloud resources.You can achieve cross-region 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.

Directions

Getting Basic Information of a Container

  1. Log in to the TKE console.
  2. In the left sidebar, click Clusters to go to the cluster management page.
  3. Click the ID/name of the cluster where cross-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.
  4. In the left sidebar, select "Basic information" to go to the "Basic information" page. See the figure below:
  5. Record the information of "Region", "Node network", and "Container network" in "Basic information".
  6. Repeat step 3 to step 5 and record the information of "Region", "Node network", and "Container network" of another cluster container.
    For example, you can record the information of "Region", "Node network", and "Container network" of cluster container B.

Configuring a Routing Table

  1. Switch to the VPC console.
  2. In the left sidebar, click Peering Connection to go to the peering connection management page and record the ID/name of the peering connection. See the figure below:
  3. In the left sidebar, click Subnet to go to the subnet management page.
  4. Click the local end of the peering connection and specify the routing table associated with the subnet. See the figure below:
  5. On the "Default details" page of the associated routing table, click + Create a routing policy.
  6. 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.
  7. Click OK to complete the configuration of the routing table of the local end.
  8. Repeat step 3 to step 7 to complete the configuration of the routing table of the opposite end.

Expected Result

Containers can communicate with one another. For the login method of the container, see Basic Operations of a Remote Terminal.

  1. Log in to the container of cluster A and access the container of cluster B from there. See the figure below:
    A Pod in Shanghai accesses a Pod in Beijing
  2. Log in to the container of cluster B and access the container of cluster A from there. See the figure below:
    A Pod in Beijing accesses a Pod in Shanghai