All Products
Search
Document Center

:How Do I Rename SLB Instances if the CCM Version is V1.9.3.10 or Earlier?

最終更新日:Jul 21, 2022

Overview

This document describes how to rename Server Load Balancer (SLB) instances if the Cloud Controller Manager (CCM) version is V1.9.3.10 or earlier.

Details

For CCM versions later than V1.9.3.10, a tag is automatically added to an SLB instance when CCM creates the SLB instance. This way, you can rename the SLB instance. For CCM V1.9.3.10 and earlier, you must manually add a tag to an SLB instance before you can rename the SLB instance.

  1. Log on to a master node in a Container Service for Kubernetes (ACK) cluster. For more information, see Use kubectl to connect to an ACK cluster.
  2. Run the following command to view the type and IP address of the service:
    kubectl get svc -n [$Namespace] [$Service]
    Note: Replace [$Namespace] with the namespace of the selected cluster and [$Service] with the service name.
    The following output is returned. The service type is LoadBalancer.
  1. Run the following command to generate the tag that you want to add to the SLB instance:
    kubectl get svc -n [$Namespace] [$Service] -o jsonpath="{.metadata.uid}"|awk -F "-" '{print "kubernetes.do.not.delete: "substr("a"$1$2$3$4$5,1,32)}'
    The following output is returned:
  1. Log on to the SLB console, select the region where the SLB instance is deployed, and then use the IP address that is returned in Step 2 to find the SLB instance.
  2. Add the tag that is generated in Step 3 to the SLB instance. In the preceding figure, Callout 1 is the tag key, and Callout 2 is the tag value. For more information, see Add tags.

Applicable scope

  • ACK