Add a service to a gateway to register its endpoint. Cloud-native API Gateway supports multiple service sources, including ACK, MSE Nacos, fixed addresses, DNS domain names, and Function Compute (FC).
Procedure
Log on to the API Gateway console.
In the left-side navigation pane, click . In the top navigation bar, select a region.
On the Instance page, click the target instance ID.
-
In the navigation pane on the left, choose Service, and click Create Service. In the Create Service panel, select a Service Source, configure its parameters, and then click OK.
Cloud-native API Gateway does not rewrite the Host header when forwarding requests to a domain-name-based backend service. To rewrite the Host header, Configure an HTTP rewrite policy.
Service parameters
|
Service source |
Parameter |
Description |
|
ACK Note
The gateway fetches services from an ACK or ACK Serverless cluster and registers them with their backend node addresses. |
Namespace |
Namespace of the selected cluster. Services in the |
|
Services |
Select a service. Services whose names start with |
|
|
MSE Nacos |
Namespace |
Namespace in the MSE Nacos instance. |
|
Services |
Select a service. Services whose names start with |
|
|
Function Compute |
Backend Services |
|
|
Function list |
Select a function. |
|
|
Version or alias |
Select a version or alias for the function. |
|
|
SAE Kubernetes |
Namespace |
Namespace of the selected cluster. |
|
Services |
Select a service. |
|
|
Fixed Address Note
Use this source type if the service does not use a service discovery mechanism. You must manually specify backend node addresses. |
Service Name |
Custom name for the service. |
|
Service URL |
Backend node addresses in the format |
|
|
TLS Mode |
TLS mode for backend communication. Default: disabled.
|
|
|
DNS Domain Name Note
The gateway resolves DNS entries to obtain backend service endpoints. |
Service Name |
Custom name for the service. |
|
Service URL |
Backend node addresses in the format |
|
|
TLS Mode |
TLS mode for backend communication. Default: disabled.
|
|
|
CloudFlow Important
|
Workflow |
Select an existing CloudFlow. |
|
Invocation Method |
Invocation mode:
|
|
Verify the result
On the Services tab, confirm the new service appears with the correct Service Name, Service URL, and Service Source.
Related topics
After you create a service, you can manage it from the Manage services page.