A cloud-native gateway supports adding service sources, such as container service (including ACK and ACK Serverless Cluster), EDAS Registry, SAE Registry, SAE Kubernetes, MSE ZooKeeper (supported only by standard cloud-native gateway instances), and MSE Nacos. This topic describes how to add a service source.
Configuration
If a service source that is configured becomes invalid, manually delete the service source. Otherwise, stability issues may occur. For example, service information may fail to be synchronized from other sources in a timely manner.
You can add a Domain Name System (DNS) domain name or a fixed address as a service without the need to configure a service source. For more information, see Create a service.
If your cloud-native gateway does not allow you to monitor Ingress resources in Kubernetes clusters, you must upgrade your gateway version. For more information about how to upgrade cloud-native gateways, see Upgrade an MSE cloud-native gateway.
If you add an ACK or ASK cluster as a service source of a cloud-native gateway, the cloud-native gateway monitors the services and endpoints of the ACK or ASK cluster to obtain the related information. If you configure HTTPS requests for a cloud-native gateway based on Ingress resources in Kubernetes clusters, the cloud-native gateway also needs to monitor cluster secrets to obtain information about HTTPS certificates.
If an access control policy is configured for the API server in the ACK cluster, ensure that the gateway can access the API server.
Procedure
Log on to the MSE console. In the top navigation bar, select a region.
In the left-side navigation pane, choose Cloud-native Gateway > Gateways. On the Gateways page, click the ID of the gateway.
In the left-side navigation pane, click Routes. Then, click the Source tab.
On the Source tab, click Add Source. In the Add Source panel, configure the parameters and click OK.
You can set Source Type to Container Service, MSE Nacos, MSE ZooKeeper, SAE Built-in Registry, or EDAS Built-in Registry.
ACK as the service sourceContainer Service
Parameter
Description
ACK/ACK Serverless Cluster
Select the cluster in which your backend service is deployed.
NoteWhen you create a gateway, you need to select the VPC in which the cluster is deployed. This way, when you add a service source, the cluster in this VPC is automatically obtained.
Listen to Kubernetes Ingress
If you turn on the Listen to Kubernetes Ingress switch, the cloud-native gateway automatically monitors the changes of Ingress resources, and the monitored configurations of domain names and routes of the Ingress resources take effect.
If you turn off the Listen to Kubernetes Ingress switch, the cloud-native gateway no longer monitors the changes of Ingress resources, and the previously monitored configurations of domain names and routes of the Ingress resources become invalid. Exercise caution when you perform this operation.
ImportantThe priorities of the domain names and routes that are manually configured in the MSE console are higher than the priorities of the domain names and routes of the Ingress resources monitored by the cloud-native gateway.
Ingress Class
The Ingress class with which Ingress resources are associated.
If you do not specify this parameter, the cloud-native gateway monitors all the Ingress resources in the cluster.
If you set this parameter to a specific value (only a single value is supported, and batch configuration is not supported), the Ingress resources that have the
classannotation or whoseSpec.IngressClassNamevalue is the same as the configured value are listened for. For example, if you set this parameter tonginx, the Cloud-native API Gateway instance monitors the Ingress resources whose IngressClass isnginxor the Ingress resources that are not associated with Ingress classes.
Namespace
The namespace to which Ingress resources belong.
If you do not specify this parameter, the cloud-native gateway monitors all the Ingress resources in all the namespaces of the cluster.
If you specify a single namespace for this parameter, the cloud-native gateway monitors the Ingress resources in the specified namespace of the cluster. You cannot specify multiple namespaces for this parameter at a time.
Update Ingress Status
If you set this parameter to Open, the IP address of the monitored Ingress is changed to the IP address of the Server Load Balancer (SLB) instance associated with the cloud-native gateway.
NoteYou can use this feature only if the gateway version is 1.2.9 or later.
Security Group Rules
Security groups are configured in the node pool of the container cluster. In most cases, if an external component wants to access a service in the cluster, you must open all ports required by the service in the security groups.
You can modify security groups. For more information, see Configure security group rules.
Parameters that need to be configured when you set Source Type to MSE Nacos
Parameter
Description
Nacos Instance
Select an instance.
NoteOnly MSE Nacos instances whose MCPEnabled is set to true are displayed. You can change the parameter settings on the Parameter Settings page for the MSE Nacos instances.
Parameters that need to be configured when you set Source Type to MSE ZooKeeper
NoteThis feature is supported only by standard cloud-native gateway instances. Serverless instances do not support adding MSE ZooKeeper as a service source.
Parameter
Description
Cluster Name
Select an instance.
Parameters that need to be configured when you set Source Type to SAE Built-in Registry
Parameter
Description
Namespace
Select the namespace of the SAE registry where the service is deployed.
Service Group
If a special service group is specified for your service, click Add Service Group to add the service group.
Parameters that need to be configured when you set Service Source to EDAS Built-in Registry
Parameter
Description
Microservices Space
Select the microservice space of the EDAS registry where the service is deployed.
Service Group
If a special service group is specified for your service, click Add Service Group to add the service group.
SAE Kubernetes as the service source
Parameter
Description
Namespace
Select the namespace of the SAE Kubernetes where the service is deployed.
Verify the result
Return to the Source tab on the Routes page and view the information about service sources. If the information about the service source that you added is displayed, the service source is added.