All Products
Search
Document Center

Alibaba Cloud Service Mesh:Access an ingress gateway by using multiple CLB instances

Last Updated:Jan 25, 2024

You can associate multiple Classic Load Balancer (CLB) instances with a Service Mesh (ASM) ingress gateway so that multiple CLB instances can be used to access the ingress gateway. This topic describes how to access an ingress gateway by using multiple CLB instances that are associated with the ingress gateway.

Prerequisites

Procedure

You need to create an additional CLB instance for the ingress gateway by creating a service with which the CLB instance is associated.

Note

If you delete the service associated with the CLB instance, the CLB instance is also deleted.

  1. Log on to the ACK console.

  2. In the left-side navigation pane of the ACK console, click Clusters.

  3. On the Clusters page, find the cluster that you want to manage and click the name of the cluster or click Details in the Actions column. The details page of the cluster appears.

  4. In the left-side navigation pane of the details page, choose Network > Services

  5. In the upper part of the Services page, set the Namespace parameter to istio-system and click Create Resources in YAML in the upper-right corner.

  6. On the Create page, select Custom from the Sample Template drop-down list, enter the following content in the Template field, and then click Create.

    Important

    The value of the nodePort parameter cannot be the same as an existing port number.

    apiVersion: v1
    kind: Service
    metadata:
      annotations:
        service.beta.kubernetes.io/alibaba-cloud-loadbalancer-spec: slb.s1.small
        service.beta.kubernetes.io/alicloud-loadbalancer-address-type: internet
      labels:
        app: istio-ingressgateway
        asm-system: 'true'
        istio: ingressgateway
      name: istio-ingressgateway-2
      namespace: istio-system
    spec:
      externalTrafficPolicy: Cluster
      ports:
        - name: http-0
          nodePort: 30544
          port: 80
          protocol: TCP
          targetPort: 80
        - name: https-2
          nodePort: 30682
          port: 443
          protocol: TCP
          targetPort: 443
      selector:
        app: istio-ingressgateway
        asm-system: 'true'
        istio: ingressgateway
        provider: asm
      sessionAffinity: None
      type: LoadBalancer
    • name: the name of the service to be created. In this example, the value is set to istio-ingressgateway-2.

    • service.beta.kubernetes.io/alibaba-cloud-loadbalancer-spec: the specifications of the CLB instance. Valid values: slb.s1.small, slb.s2.small, slb.s2.medium, slb.s3.small, slb.s3.medium, and slb.s3.large.

    • service.beta.kubernetes.io/alicloud-loadbalancer-address-type: the network type of the CLB instance to be created. Valid values:

      • internet: an Internet-facing CLB instance

      • intranet: an internal-facing CLB instance

    After the service is created, a CLB instance is automatically created.

  7. Access the ingress gateway by using multiple CLB instances.

    1. Obtain the IP addresses using port 80 of the istio-ingressgateway and istio-ingressgateway-2 services in the External IP column on the Services page.

    2. Enter http://<IP address of the istio-ingressgateway service>/productpage and http://<IP address of the istio-ingressgateway-2 service}>/productpage in the address bar of the browser.

      Bookinfo

      If the page of the Bookinfo application appears after you enter each of the URLs, the preceding configurations take effect. In this case, you can access the ingress gateway by using multiple CLB instances.