All Products
Search
Document Center

API Gateway:Create a service

Last Updated:Dec 04, 2025

You can add a service to a gateway to provide the gateway with the service endpoint. Cloud-native API gateways support multiple service sources, such as Container Service, MSE Nacos, fixed addresses, DNS domain names, and Function Compute (FC).

Procedure

  1. Log on to the API Gateway console.

  2. In the left-side navigation pane, click Cloud-native API Gateway > Instance. In the top navigation bar, select a region.

  3. On the Instance page, click the target instance ID.

  4. In the navigation pane on the left, choose Service and click Create Service. In the Create Service panel, select a Service Source and configure the parameters. After the configuration is complete, click OK.

Note

The cloud-native API gateway does not modify your requests. When a request is forwarded to a backend service that uses a domain name, the Host header is not rewritten to the configured domain name. To rewrite the Host header, see Configure an HTTP rewrite policy.

Service parameters

Service Source

Configuration Item

Description

ACK

Note

If you add Container Service as a service source to the gateway, the gateway obtains the service list from an ACK/ACK Serverless cluster and adds the services and their backend node addresses to the gateway.

Namespace

The namespace of the selected cluster. By default, services in the arms-prom, kube-system, and mse-pilot namespaces are not displayed.

Services

Select a service from the service list. By default, services whose names start with `consumers` are not displayed.

MSE Nacos

Namespace

The namespace of the selected cluster. By default, services in the arms-prom, kube-system, and mse-pilot namespaces are not displayed.

Services

Select a service from the service list. By default, services whose names start with `consumers` are not displayed.

Function Compute

Backend Services

Function list

Select a function from the function list.

Version or alias

Select the version or alias of the function.

SAE Kubernetes

Namespace

The namespace of the selected cluster.

Services

Select a service from the service list.

Fixed Address

Note

If the service does not have a service discovery mechanism, you must manually add the backend node addresses of the service.

Service Name

A custom service name.

Service URL

The backend node address of the service. The backend nodes of services from different sources vary, but the format is always <Backend node IP address>:<Service port>. Separate multiple nodes with line breaks.

TLS Mode

Select a TLS mode from the drop-down list. By default, TLS is disabled.

  • Disable: You do not need to enable TLS to access the service.

  • TLS: Enable one-way TLS when you need to use HTTPS to access the service.

  • mTLS: Enable mTLS when you need to perform mutual authentication.

DNS Domain Name

Note

The cloud-native API gateway supports using the results of DNS parsing as backend service endpoints.

Service Name

A custom service name.

Service URL

The backend node address of the service. The backend nodes of services from different sources vary, but the format is always <Backend node IP address>:<Service port>. Separate multiple nodes with line breaks.

TLS Mode

Select a TLS mode from the drop-down list. By default, TLS is disabled.

  • Disable: You do not need to enable TLS to access the service.

  • TLS: Enable one-way TLS when you need to use HTTPS to access the service.

  • mTLS: Enable mTLS when you need to perform mutual authentication.

CloudFlow

Important
  • The CloudFlow service requires the gateway version to be 2.1.8 or later. If the gateway instance version is earlier than 2.1.8, upgrade the gateway version.

  • After the service is created, the system adds an HTTP rewrite policy to the inbound processing policy of the API to redirect requests to /. The policy cannot be modified or deleted.

  • The CloudFlow service is supported only in single-service scenarios.

Workflow

Select a created CloudFlow.

Invocation Method

Asynchronous and synchronous calls are supported:

  • StartExecution (asynchronous invocation): Standard mode workflows support only asynchronous invocations.

  • StartSyncExecution (synchronous call): Express mode workflows support only synchronous calls.

Verify the result

On the Services tab, you can view the information about the service that you created. The service is successfully created if its information, such as Service Name, Service URL, and Service Source, is displayed.

References

After a service is created, you can also manage it. For more information, see Manage services.