To allow a gateway to obtain service endpoints, you must add an existing service to the gateway and register the service as a destination service for routing. Microservices Engine (MSE) cloud-native gateways allow you to add services from the following sources: Container Service for Kubernetes (ACK) clusters, MSE Nacos instances, MSE Zookeeper instances, Enterprise Distributed Application Service (EDAS) registries, Serverless App Engine (SAE) registries, fixed endpoints, Domain Name System (DNS) domain names, and Function Compute.
Procedure
Log on to the MSE console, and select a region in the top navigation bar.
In the left-side navigation pane, choose Cloud-native Gateway > Gateways.
On the Gateways page, click the name of the desired gateway.
In the left-side navigation pane, click Routes. Then, click the Services tab.
Click Add Service. In the Add Service panel, select a service source from the Service Source drop-down list, configure the parameters, and then click OK.
NoteWhen the cloud-native gateway forwards a request to a backend service that uses a specified domain name, the gateway does not rewrite the host domain name as the specified domain name. For more information about how to rewrite a domain name, see Configure a rewrite policy.
Parameters
Add a service from an ACK cluster: If you select Container Service from the Service Source drop-down list, the cloud-native gateway obtains the service list from an ACK cluster or ACK Serverless cluster and allows you to add the services in the list and their backend node endpoints to the gateway.
Add a service from a fixed endpoint: If the service discovery mechanism is not provided for the service that you want to add, you must manually add the backend node endpoints of the service to the gateway.
Add a service from a DNS domain name: If you select DNS Domain Name from the Service Source drop-down list, the cloud-native gateway allows you to use the DNS resolution result as the backend service endpoint.
Service Source | Parameter | Description |
Container Service Note If you select Container Service from the Service Source drop-down list, the gateway obtains the service list from an ACK or ACK Serverless cluster and allows you to add the services and their node endpoints in the list to the gateway. | Namespace | Select a namespace to which the cluster belongs. By default, services in the arms-prom, kube-system, and mse-pilot namespaces are not displayed. |
Services | Select one or more services. By default, services whose names start with consumers are not displayed. | |
MSE Nacos | Specify Nacos Instance | |
Nacos Source List | Select a Nacos instance from the drop-down list. After you specify a Nacos instance, the system obtains the address information of the service and its providers only from the instance. | |
Namespace | Select a namespace to which the cluster belongs. By default, services in the arms-prom, kube-system, and mse-pilot namespaces are not displayed. | |
Services | Select one or more services. By default, services whose names start with consumers are not displayed. | |
Fixed Address Note If the service that you want to add cannot be found by using the service discovery mechanism, you can select this option for Service Source in the Add Service panel and manually add the backend node endpoint. | Service Name | Enter a name of the service. |
Service Address | Enter backend node endpoints. Backend node endpoints vary with service sources. The endpoint must be in the format of | |
TLS Mode | Select a Transport Layer Security (TLS) mode from the drop-down list. Default value: Disabled. Valid values:
| |
DNS Domain Name Note If you select DNS Domain Name from the Service Source drop-down list, the gateway allows you to use a DNS resolution result as the backend service endpoint. | Service Name | Enter a name of the service. |
Service Port | Enter the port number of the service. The value ranges from 1 to 65535. | |
Domain Names | Enter one or more domain names. Example: | |
TLS Mode | Select a Transport Layer Security (TLS) mode from the drop-down list. Default value: Disabled. Valid values:
| |
More settings | ||
DNS Servers | Configure one or more DNS servers for the service. For more information, see Configure a DNS server. Note If you do not specify this parameter, the default DNS server of the system is used. | |
MSE Zookeeper | Services | Select one or more services in the Services section. |
EDAS Built-in Registry | Microservice Space | Select the microservices namespace to which the service belongs. |
Services | Select one or more services in the Services section. | |
SAE Registry | Namespace | Select the namespace where the service resides. |
Services | Select one or more services in the Services section. | |
Function Compute | Service Name | Select the Function Compute service name. |
Version or Alias | Select a version or alias of the function. | |
Functions | Select one or more functions. | |
SAE Kubernetes Note The service list displays the applications that have | Namespace | Select a namespace to which the cluster belongs. |
Services | Select one or more services in the Services section. | |
Verify the result
Return to the Services tab on the Routes page, and view the information about the service that you added. If the information about the service that you added, such as Service Name, Service Address, and Service Source, is displayed, the service is added.
References
After a service is added, you can manage the service. For more information, see Manage services.