All Products
Search
Document Center

Alibaba Cloud Service Mesh:How can I retain the CLB instance configured for an ingress gateway when I delete the ingress gateway?

Last Updated:Jan 23, 2024

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

Problem description

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

Cause

If Create a CLB Instance is specified when an ingress gateway is created, a CLB instance is automatically created. In this case, when the ingress gateway is deleted, the CLB instance that is automatically created is also deleted.

Note

If Use Existing CLB Instance is specified when an ingress gateway is created, the CLB instance is retained after the ingress gateway is deleted.

Solution

To retain the CLB instance that is automatically created for an ingress gateway when you delete the 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, click the name of the ASM instance. In the left-side navigation pane, choose ASM Gateways > Ingress Gateway.

    4. On the Ingress Gateway page, obtain the IP address of the ingress gateway whose CLB instance you want to retain.获取网关地址

  2. Obtain the ID of the CLB instance.

    1. Log on to the CLB console.

    2. In the left-side navigation pane, choose CLB > 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 CLB instance.获取SLB实例ID

  3. Modify the YAML file of the ingress gateway.

    1. On the Ingress Gateway page, find the ingress 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 {YourCLBId} with the ID of the CLB instance obtained in Step 2.

      service.beta.kubernetes.io/alibaba-cloud-loadbalancer-id: {YourCLBId}

      YAMLAfter you modify the YAML file, the system automatically redeploys the ingress gateway. The ingress gateway enters the Creating state. If the state of the ingress gateway becomes Running, the ingress gateway is redeployed. If the status of the ingress gateway becomes Running, the ingress gateway is redeployed.添加负载均衡id

  4. Delete the ingress gateway and check whether the CLB instance that is automatically created for the ingress gateway is retained.

    1. On the Ingress Gateway page, find the ingress gateway that you want to delete and click Delete. In the Submit message, click OK.

    2. Log on to the CLB console. On the Instances page, enter the IP address of the ingress gateway obtained in Step 1 in the search box.

      The following figure shows that the CLB instance is displayed on the Instances page. This indicates that the CLB instance is not deleted after the ingress gateway is deleted.保留SLB实例