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.
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:
Obtain the IP address of the ingress gateway.
Log on to the ASM console.
In the left-side navigation pane, choose .
On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose .
On the Ingress Gateway page, obtain the IP address of the ingress gateway whose CLB instance you want to retain.
Obtain the ID of the CLB instance.
Log on to the CLB console.
In the left-side navigation pane, choose .
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.
Modify the YAML file of the ingress gateway.
On the Ingress Gateway page, find the ingress gateway that you want to view and click YAML.
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}
After 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.
Delete the ingress gateway and check whether the CLB instance that is automatically created for the ingress gateway is retained.
On the Ingress Gateway page, find the ingress gateway that you want to delete and click Delete. In the Submit message, click OK.
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.