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
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 and configure the parameters. After the configuration is complete, click OK.
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 | |
TLS Mode | Select a TLS mode from the drop-down list. By default, TLS is disabled.
| |
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 | |
TLS Mode | Select a TLS mode from the drop-down list. By default, TLS is disabled.
| |
CloudFlow Important
| Workflow | Select a created CloudFlow. |
Invocation Method | Asynchronous and synchronous calls are supported:
| |
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.