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

Networking

Updated on 2024-10-29 GMT+08:00

Overview

This section describes how you can:

  • Specify a default DNS server for the pods scheduled to CCI.
  • Use a Service to enable communications between the pods in a CCE cluster and the pods in CCI.
  • Use a Service to expose pods in CCI.

Constraints

  • Networking cannot be enabled for CCE clusters that use a shared VPC.
  • If the bursting add-on is to scale the pods to CCI 2.0, dedicated load balancers can be configured for ingresses and Services of the LoadBalancer type. The bursting add-on of a version earlier than 1.5.5 does not support Services of the LoadBalancer type.
  • Currently, the network communication depends on sidecar containers and is not supported for init containers. If service containers use preStart or postStart to block the startup of subsequent containers, the network communication will be abnormal.
  • Pods deployed across CCE and CCI can only communicate through ClusterIP Services. CCE ClusterIP Services cannot be accessed init containers.
  • When you interconnect pods deployed across CCE and CCI with a LoadBalancer Service or ingress:
    • Do not specify the health check port. In a CCE cluster, CCI containers and CCE containers use different backend ports registered with ELB. If you specify a health check port, some backend health checks will be abnormal.
    • Ensure that the health check method will not impact service access if different clusters use a Service to connect to the listener of the same ELB load balancer.
    • Allow traffic from the container port for 100.125.0.0/16 in the node security group when you interconnect pods deployed across CCE and CCI with a shared LoadBalancer Service or ingress.

Specifying a Default DNS Server

Scenario

In some scenarios, you need to specify a default DNS server for the pods scheduled to CCI. The bursting add-on allows you to specify a DNS server address without the need to configure the dnsConfig field for each pod, reducing network O&M costs.

Procedure

  1. Log in to a CCE cluster node and edit the YAML file.
    kubectl edit deploy cceaddon-virtual-kubelet-virtual-kubelet -nkube-system
  1. Add --cluster-dns=x.x.x.x to the startup parameters and replace x.x.x.x with the DNS server address.
  2. Save the modification and wait for the virtual-kubelet workload to restart.

  3. Verify the DNS server address.
    Run the exec command to access a container running in CCI and check whether the IP address following nameserver in the first line is the address configured for cluster-dns in the /etc/resolv.conf file.
    Table 1 Constraints in different application scenarios

    Application Scenario

    Constraints

    There are pods running in CCI before the DNS server address is specified.

    • The DNS server address is only available for new pods that are scheduled to CCI.
    • To make the DNS server address available for the pods that are running before the modification, these pods need to be redeployed.

    There is a limit for cluster-dns

    • You can specify a maximum of three name servers in dnsConfig.
    • Ensure that the sum of the nameserver value in cluster-dns and the nameservers value in Pod dnsConfig does not exceed 3.

How to Use a Service to Enable Communications Between Pods in a CCE Cluster and Pods in CCI

  1. Install the bursting add-on and enable Networking.

    After the installation is successful, a load balancer is automatically created in your account. You can view the load balancer on the networking console.

  2. Create a pod in CCI and configure a Service to expose the pod.
    • To facilitate verification, select the Nginx image that uses port 80.
    • When you create a Service, use the load balancer that is automatically created to avoid conflicts with the load balancer created by the bursting add-on.

  3. Obtain the access mode of the pod on the CCE cluster console.
  4. Create a pod in CCE and configure a Service to expose the pod. For details, see 2.

    Do not select the label for pods scheduled to CCI.

  5. Verify network connectivity.

    Create a pod in CCI and select an image that contains the curl command, for example, centos.

    Access the container on the CCI console and check whether CCI can access CCE through the Service.

    Figure 1 Service for accessing the pod in CCI
    Figure 2 Service for accessing the pod in CCE
  6. Create a pod in CCE and select an image (for example, CentOS) that allows the curl command. Then, check whether CCE can access CCI through the Service.

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