When an Alibaba Cloud Service Mesh (ASM) ingress gateway is deleted, the Server Load Balancer (SLB) instance configured for the ASM ingress gateway is also deleted. This topic describes the cause of the issue and provides a solution.

Problem description

When an ASM ingress gateway is deleted, the SLB instance configured for the ASM ingress gateway is also deleted.

Cause

If Create SLB Instance is specified when an ASM ingress gateway is created, an SLB instance is automatically created. In this case, when the ASM ingress gateway is deleted, the SLB instance that is automatically created is also deleted.
Note If Use Existing SLB Instance is specified when an ASM ingress gateway is created, the SLB instance is retained after the ASM ingress gateway is deleted.
Create SLB Instance

Solution

To retain the SLB instance that is automatically created for an ASM ingress gateway when you delete the ASM ingress gateway, perform the following steps:

  1. Obtain the IP address of the ingress gateway.
    1. Log on to the ASM console.
    2. In the left-side navigation pane, choose Service Mesh > Mesh Management.
    3. On the Mesh Management page, find the ASM instance that you want to configure. Click the name of the ASM instance or click Manage in the Actions column.
    4. On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose ASM Gateways > Ingress Gateway.
    5. On the Ingress Gateway page, obtain the IP address of the ingress gateway whose SLB instance you want to retain. Obtain the IP address of the ingress gateway
  2. Obtain the ID of the SLB instance.
    1. Log on to the Server Load Balancer console.
    2. In the left-side navigation pane, choose CLB (FKA SLB) > Instances.
    3. On the Instances page, enter the IP address of the ingress gateway obtained in Step 1 in the search box. In the search results, you can obtain the ID of the SLB instance. obtain the ID of the SLB instance
  3. Modify the YAML file of the ASM gateway.
    1. On the Ingress Gateway page, find the gateway that you want to view and click YAML.
    2. Add the following content to the serviceAnnotations parameter in the YAML file. Then, click OK.
      Replace {YourSLBId} with the ID of the SLB instance obtained in Step 2.
      service.beta.kubernetes.io/alibaba-cloud-loadbalancer-id: {YourSLBId}
      YAMLAfter you modify the YAML file, the system automatically redeploys the ASM gateway. The ASM gateway enters the Creating state. If the state of the ASM gateway becomes Running, the ASM gateway is redeployed. Add the ID of the SLB instance
  4. Delete the ASM ingress gateway and check whether the SLB instance that is automatically created for the ASM ingress gateway is retained.
    1. On the Ingress Gateway page, find the ASM ingress gateway that you want to delete and click Delete. In the Submit message that appears, click OK.
    2. Log on to the Server Load Balancer console. On the Instances page, enter the IP address of the ASM gateway obtained in Step 1 in the search box.
      If the SLB instance is displayed in the search results on the Instances page, the settings in Step 3 take effect. The following figure shows an example. Instances