All Products
Search
Document Center

Alibaba Cloud Service Mesh:Configure a unified Istio gateway for multiple ingress gateways

Last Updated:Aug 28, 2026

An ingress gateway exposes a unified Layer 7 entry point and routes HTTP requests from the same TCP port to different Kubernetes Services based on request content. Associate one Istio gateway with multiple ingress gateways in a Service Mesh (ASM) instance so that they share one gateway configuration, reducing duplicate configuration work.

Prerequisites

Background information

The spec.selector field of a Gateway resource selects the ingress gateways with which the Istio gateway is associated: ingress gateways whose labels match the selector are selected. To share one Istio gateway among multiple ingress gateways, use the podLabels field to apply the same label to each of those ingress gateways. Then specify that label in the spec.selector field of the Gateway.

In this example, two A records are configured for the example.com domain name. The two A records map to two Classic Load Balancer (CLB) instances, and each CLB instance is associated with one ingress gateway in the ASM instance. Both ingress gateways require the same Istio gateway, so you associate the Istio gateway with the ingress gateways to keep their configuration consistent.

A Gateway only configures the ports where a proxy listens. You must also configure a VirtualService to define the traffic routing rules.

For more information about the fields of an ingress gateway and a Gateway, see CRD fields for an ASM gateway and Gateway.

Procedure

The following steps use the label key1: value1 for both the ingress gateways and the Gateway.

  1. Log on to the ASM console. In the left-side navigation pane, choose Service Mesh > Mesh Management.

  2. On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose ASM Gateways > Ingress Gateway.

  3. On the Ingress Gateway page, find one of the target ingress gateways and click View YAML in the Actions column.

  4. In the Edit dialog box, configure the podLabels field and click OK.

    ...
    spec:
      podLabels:
        key1: value1
    ...

    Repeat this process for all other target ingress gateways: view the YAML of each ingress gateway and configure the same podLabels label.

  5. Associate an Istio gateway with the ingress gateways.

    1. On the details page of the ASM instance, choose ASM Gateways > Gateway in the left-side navigation pane.

    2. On the Gateway page, find the target Gateway and click View YAML in the Operator column.

    3. In the Edit dialog box, configure the selector field and click OK.

      apiVersion: networking.istio.io/v1beta1
      kind: Gateway
      metadata:
        name: bookinfo-gateway
        namespace: default
      spec:
        selector:
          key1: value1
        servers:
          - hosts:
              - '*'
            port:
              name: http
              number: 80
              protocol: HTTP

What to do next

To define how the ingress gateways route requests to Kubernetes Services, configure a VirtualService. For more information about the fields of a VirtualService, see VirtualService. For instructions, see Manage virtual services.