This topic describes how to bind an additional CLB instance to an ASM ingress gateway and use multiple CLBs to access it.
Prerequisites
-
An ingress gateway is deployed. For more information, see Create an ingress gateway.
After the ingress gateway is deployed, a Service named
istio-ingressgatewayis automatically created in the ACK cluster. -
The Bookinfo sample application and its Istio resources are deployed in the ASM instance. This allows you to access the application through the ingress gateway. For more information, see Deploy an application in an ACK cluster that is associated with an ASM instance and Use Istio resources for traffic routing.
Procedure
Create a new Service to provision an additional CLB instance for the ASM ingress gateway.
Deleting the additional Service also deletes the corresponding CLB instance.
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Cluster List page, click the name of the destination cluster or click Details in the Actions column.
In the left navigation pane of the cluster management page, choose .
-
On the Services page, set the Namespace to istio-system, and then click Create Resources in YAML in the upper-right corner.
-
On the Create page, set Sample Template to Custom, copy the following content into the Template text box, and click Create.
ImportantThe
nodePortvalue must not conflict with any existing ports in the cluster.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. In this topic, this parameter is set to istio-ingressgateway-2.
-
service.beta.kubernetes.io/alibaba-cloud-loadbalancer-spec: Sets the CLB instance specification. 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: Specifies the network type of the CLB. Valid values:
-
internet: Public network.
-
intranet: private network.
-
After you create the Service, the system automatically provisions a new CLB instance.
-
-
Verify that the ASM ingress gateway is accessible through multiple CLB instances.
-
On the Services page, find the
istio-ingressgatewayandistio-ingressgateway-2Services. For each Service, note its IP address for port 80 from the External IP column. -
In your web browser, visit http://<External_IP_of_istio-ingressgateway>/productpage and http://<External_IP_of_istio-ingressgateway-2>/productpage separately.
The product page for the Bookinfo Sample application is displayed, which includes a summary of the book The Comedy of Errors, a Book Details section (Type, Pages, Publisher, Language, ISBN, etc.), and a Book Reviews section (user ratings and reviews).
The ASM ingress gateway is accessible through multiple CLB instances if the Bookinfo application page loads successfully from both addresses.
-