All Products
Search
Document Center

Microservices Engine:Add a service source

Last Updated:Apr 07, 2024

Cloud-native gateways support the following types of service sources: Container Service for Kubernetes (ACK) or ACK Serverless (ASK) clusters, Enterprise Distributed Application Service (EDAS) registries, Serverless App Engine (SAE) registries, Microservices Engine (MSE) ZooKeeper instances, and MSE Nacos instances. This topic describes how to add a service source in which your backend services are deployed or with which your backend services are registered. This way, the cloud-native gateway can dynamically obtain your backend service list.

Note
  • If the configured service source is invalid, manually clear the configuration of the service source. Otherwise, stability issues may occur. For example, service information from other sources cannot be synchronized at the earliest opportunity.

  • You can add a DNS domain name or a fixed endpoint as a service source without the need to configure the service source. For more information, see Add a service.

Procedure

Note
  • If your cloud-native gateway does not allow you to listen to Ingress resources in Kubernetes clusters, you must upgrade your gateway version. For more information, 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 listens to 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 listens to cluster secrets to obtain information about HTTPS certificates.

  1. Log on to the MSE console. In the top navigation bar, select a region.

  2. In the left-side navigation pane, choose Cloud-native Gateway > Gateways. On the Gateways page, click the name of the gateway.

  3. In the left-side navigation pane, choose Service Management > Sources.

  4. On the Sources page, click Add Source.

  5. In the Add Source panel, configure the parameters and click OK.

    You can select Container Service, MSE Nacos, MSE ZooKeeper, EDAS Registry, or SAE Registry for Source Type.

    If you select Container Service for Source Type, you need to configure the following parameters.

    Parameter

    Description

    ACK/ACK Serverless Cluster

    Select the cluster in which your backend service is deployed.

    Note

    When 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 select this check box, the cloud-native gateway automatically listens to the changes of Ingress resources, and the listened configurations of domain names and routes of the Ingress resources take effect.

    • If you clear this check box, the cloud-native gateway no longer listens to the changes of Ingress resources, and the previously listened configurations of domain names and routes of the Ingress resources become invalid. Exercise caution when you perform this operation.

    Important

    The 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 that the cloud-native gateway listens to.

    Ingress Class

    The Ingress class with which Ingress resources are associated.

    • If you do not specify this parameter, the cloud-native gateway listens to all the Ingress resources in the cluster.

    • If you specify an Ingress class for this parameter, the cloud-native gateway listens to the Ingress resources that have the class annotation or whose Spec.IngressClassName value is the same as the configured value. You cannot specify multiple Ingress classes for this parameter. If you set this parameter to nginx, the cloud-native gateway listens to the Ingress resources whose IngressClass is nginx or the Ingress resources that are not associated with any Ingress class.

    Namespace

    The namespace to which Ingress resources belong.

    • If you do not specify this parameter, the cloud-native gateway listens to all the Ingress resources in all the namespaces of the cluster.

    • If you specify a single namespace for this parameter, the cloud-native gateway listens to 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 select Open for this parameter, the IP address of the Ingress that you listen to is changed to the IP address of the Server Load Balancer (SLB) instance associated with the cloud-native gateway.

    Note

    You 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 ACK or ASK cluster. In most cases, if the components outside the cluster want to access services in the cluster, you must enable all ports required by the services in security groups.

    You can modify security group rules. For more information, see Configure security group rules.

    If you select MSE Nacos for Source Type, you need to configure the following parameters.

    Parameter

    Description

    Nacos Instance

    Select an instance.

    Note

    Only MSE Nacos instances with MCPEnabled set to true are displayed. You can change the parameter setting on the Parameter Settings page for the MSE Nacos instances.

    If you select MSE ZooKeeper for Source Type, you need to configure the following parameters.

    Parameter

    Description

    Cluster Name

    Select an instance.

    If you select EDAS Registry for Source Type, you need to configure the following parameters.

    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.

    If you select SAE Built-in Registry for Source Type, you need to configure the following parameters.

    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.

Verify the result

Go to the Sources page to view the information about the service source that you added. If the service source information is displayed, the service source is successfully added.