Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Ubiquitous Cloud Native Service/ Best Practices/ Cluster Federation/ Using a VPC Peering Connection to Connect CCE Clusters

Using a VPC Peering Connection to Connect CCE Clusters

Updated on 2024-11-01 GMT+08:00

Application Scenarios

Before creating an MCS object, ensure connectivity of both inter-cluster nodes and containers. You can create a VPC peering connection to connect CCE clusters across VPCs.

This section describes how you can create a VPC peering connection for connectivity of both inter-cluster nodes and containers.

Configuring Cluster Network Types

Set the network type to underlay for inter-cluster pod communication. The following table lists the types of CCE clusters that support underlay networks.
Table 1 Types of CCE clusters that support underlay networks

CCE Cluster Type

Network Type

Support Underlay Network

CCE clusters

Container tunnel network

No

VPC network

Yes

CCE Turbo clusters

Cloud native network 2.0

Yes

Creating a VPC Peering Connection

  1. Go to the VPC peering connection list page.
  2. In the upper right corner of the page, click Create VPC Peering Connection. In the displayed dialog box, configure parameters as prompted. For details about the parameters, see Table 2.

    Figure 1 Creating a VPC peering connection
    Table 2 Parameters for creating a VPC peering connection

    Parameter

    Mandatory

    Description

    VPC Peering Connection Name

    Yes

    Name of the VPC peering connection.

    The name can contain a maximum of 64 characters, including letters, digits, hyphens (-), and underscores (_).

    Local VPC

    Yes

    VPC of the local cluster. Select one from the drop-down list.

    Local VPC CIDR Block

    Yes

    CIDR block of the local VPC.

    Account

    Yes

    Select My account or Another account. In this example, My account is selected.

    • My account: The local and peer VPCs are from the same account.
    • Another account: The local and peer VPCs are from different accounts.

    Peer Project

    Yes

    The system fills in the corresponding project by default when Account is set to My account.

    For example, if two VPCs (VPC-A and VPC-B) are in account A in region A, the system fills in the corresponding project of account A in region A by default.

    Peer VPC

    Yes

    VPC of the peer cluster. Select one from the drop-down list.

    Peer VPC CIDR Block

    Yes

    CIDR block of the peer VPC.

    The local and peer VPCs cannot have identical or overlapping CIDR blocks. Otherwise, the routes added for the VPC peering connection may not take effect.

    Description

    No

    Description of the connection. Enter up to 255 characters. Angle brackets (< or >) are not allowed.

  3. Click the VPC peering connection name. On the displayed page, click Add Route.

    As shown in Figure 2, you need to configure VPC CIDR blocks for local and peer clusters. For details, see Table 3.
    Figure 2 Adding a route
    Table 3 Route parameters

    Parameter

    Mandatory

    Description

    Destination

    Yes

    Enter the VPC CIDR block for the peer cluster.

    To query this CIDR block:
    1. Log in to the VPC console.
    2. In the navigation pane, choose Virtual Private Cloud > My VPCs. On the displayed page, locate the peer VPC and copy its IPv4 CIDR block.
    Figure 3 Querying the VPC CIDR block of the peer cluster

    Destination

    Yes

    Enter the VPC CIDR block for the local cluster.

    CAUTION:

    The destination of each route must be unique.

    Description

    No

    Supplementary information about the route.

    Enter up to 255 characters. Angle brackets (< or >) are not allowed.

  4. On the VPC peering connection details page, click Add Route.

    As shown in Figure 4, you need to configure container CIDR blocks for local and peer clusters. For details, see Table 4.

    Figure 4 Adding a route
    Table 4 Route parameters

    Parameter

    Mandatory

    Description

    Destination

    Yes

    Enter the container CIDR block of the peer cluster.

    To query this CIDR block:
    1. Log in to the CCE console.
    2. Click the name of the target cluster to access the cluster console. In the Networking Configuration area, hover over the name of Default Pod Subnet and copy the IPv4 CIDR block.
      CAUTION:

      If there are multiple CIDR blocks, create a route for each CIDR block for communication between containers.

    Figure 5 Querying the container CIDR block of the peer cluster

    Destination

    Yes

    Enter the container CIDR block of the local cluster.

    CAUTION:

    The destination of each route must be unique.

    Description

    No

    Supplementary information about the route.

    Enter up to 255 characters. Angle brackets (< or >) are not allowed.

Changing a Security Group

Change the security group for the node in the local cluster to allow the node in the peer cluster to access over the local container port in the inbound rule.

Set Protocol & Port to the container port of the local cluster and Source to the IP address or CIDR block of the node in the peer cluster, as shown in Figure 6. For details about how to change the security group, see Changing the Default Security Group of a Node.
Figure 6 Changing a security group

Verifying Connectivity Between Clusters

  1. Log in to the node in the local cluster and run the following command to verify the communication between the nodes in the local and peer clusters:

    ping IP address of the node in the peer cluster

    If the ping succeeds, the cluster connectivity is normal.

  2. Access the container in the local cluster and run the following command to verify the communication between the containers in the local and peer clusters:

    curl IP address of the pod in the peer cluster

    If the access succeeds, the container connectivity is normal.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback