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

Importing APIs Through CCE Workloads

Updated on 2025-01-10 GMT+08:00

You can import Cloud Container Engine (CCE) workloads to a gateway as backend services and open APIs in API Gateway for API callers.

NOTE:

If your gateway does not support CCE workload import, contact customer service.

Precautions

  • Only Huawei Cloud CCE Turbo clusters and CCE clusters using the VPC network model are supported.
  • The CCE cluster and your gateway must be in the same VPC or otherwise connected.
  • If you select a CCE cluster that uses a VPC network model, add the container CIDR block of the cluster to Routes on the gateway details page.
  • After the import, APIs will be generated, together with a microservice load balance channel that monitors and updates address changes of all pods in the workload.

Prerequisites

You have created CCE workloads

Importing a CCE Workload

  1. Go to the APIG console.
  2. Select a gateway at the top of the navigation pane.
  1. In the navigation pane, choose API Management > API Groups.
  2. Choose Create API Group > Import CCE Workload. Set the parameters according to the following table.

    Table 1 Parameter description

    Parameter

    Description

    Group

    Group to which the CCE workload belongs. You can create a group or select an existing group.

    Cluster

    Select a cluster. Click View CCE Console to view the available clusters.

    Namespace

    Namespace to which the workload will belong. A namespace is an abstract collection of resources and objects.

    Workload Type

    Select a workload type.

    • Deployment: Deployments do not store any data or status while they are running.
    • StatefulSet: StatefulSets store data and statuses while they are running.
    • DaemonSet: DaemonSets ensure that only one pod runs on all or some nodes. When a node is added to a cluster, a new pod is also added for the node. When a node is removed from a cluster, the pod is also reclaimed. If a DaemonSet is deleted, all pods created by it will be deleted.

    For details about workload types, see Overview.

    Service Label Key

    Pod label of a workload. The service label name is the pod label key and the service label value is the pod label value.

    For details about pod labels, see Configuring Labels and Annotations.

    Service Label Value

    Tag

    Pod label of a workload. If a workload cannot be identified by certain service label name and value, select another pod label to specify the workload.

    Protocol

    HTTP and HTTPS are supported. HTTPS is recommended for transmitting important or sensitive data.

    Request Path

    You can use a plus sign (+) for prefix matching. For example, /a/{b+}.

    Port

    Listening port of the CCE workload.

    Authentication Mode

    App and IAM authentication is supported. You can also choose not to authenticate requests.

    • App: Requests will be authenticated by APIG. This authentication mode is recommended.
    • IAM: Requests will be authenticated by IAM.
    • None: No authentication will be required.

    CORS

    Determine whether to enable cross-origin resource sharing (CORS).

    CORS allows browsers to send XMLHttpRequest to servers in other domains, overcoming the limitation that Asynchronous JavaScript and XML (AJAX) can be used only within the same domain.

    There are two types of CORS requests:

    • Simple requests: requests that have the Origin field in the header.
    • Not-so-simple requests: HTTP requests sent before the actual request.

    If CORS (not-so-simple request) is enabled for an API, another API that uses the OPTIONS method must be created. For details, see Enabling CORS.

    Timeout (ms)

    Backend request timeout. Range: 1–60,000 ms.

    If a backend timeout error occurs during API debugging, increase the timeout to locate the reason.

    NOTE:

    Modify the maximum timeout by referring to Configuring Gateway Parameters. The value range is 1 ms to 600,000 ms.

  3. Click OK.

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