Container Service for Kubernetes (ACK) clusters allow you to reuse Classic Load Balancer (CLB) instances. You can bind one CLB instance to multiple applications that are deployed in an ACK cluster in Enterprise Distributed Application Service (EDAS) to save resources. This way, fixed IP addresses can be provided for the applications so that O&M becomes easier.
Prerequisites
- The Cloud Controller Manager (CCM) component of the Container Service Kubernetes cluster is upgraded. For more information about how to upgrade the component, see Manage system components.
ACK clusters have multiple templates. The CCM component is upgraded to the following versions for the managed Kubernetes cluster template and the dedicated Kubernetes cluster template:
- The CCM version of a managed Kubernetes cluster is V1.9.3.112-g93c7140-aliyun or later.
- The CCM version of a dedicated Kubernetes cluster is v1.9.3.106-g3f39653-aliyun or later.
Important If you do not upgrade the CCM component of the ACK cluster, the CLB instance fails to be reused, the existing listeners of the CLB instance are deleted and the application traffic drops to zero. - A CLB instance is created. For more information, see Create a CLB instance. Important
- If you choose to create a CLB instance when you bind a CLB instance to an application on the Application Overview page, EDAS purchases a CLB instance for you. This CLB instance cannot be reused.
- The created CLB instance must be in the same virtual private cloud (VPC) as the application to which the CLB instance is to be bound.
- The limits of using CLB are learned. For more information, see Limits.
Background information
To bind a CLB instance to an application, you must modify the configurations of listeners for the CLB instance in the EDAS console.
The differences in binding CLB instances to applications in ACK clusters and user-created Kubernetes clusters lie in the following aspects:
- User-created Kubernetes cluster: You must purchase a new CLB instance for each application. Each application exclusively uses a CLB instance.
- ACK cluster: You can purchase a new CLB instance for each application or use an existing CLB instance that is bound to other applications. If you purchase a new CLB instance for an application, the application exclusively uses the CLB instance.
Reuse a CLB instance
To reuse a CLB instance, bind an existing CLB instance to an application. The procedure for binding an existing CLB instance is the same as that for binding a new CLB instance. The difference lies only in selecting a CLB instance. For more information about the procedure, see Bind CLB instances. This section describes the items that you need to take note of when you reuse a CLB instance.
- You must select a CLB instance that is created in the Server Load Balancer (SLB) console. You cannot reuse a CLB instance that is purchased in the EDAS console.
- You must select an unoccupied container port when you configure a listener.
- When you bind a CLB instance to an application, you can select whether to enable listener overriding.
To reuse a CLB instance, you must configure a listener for the application to which the CLB instance is bound. When you configure a CLB instance, you can turn on or off Overwrite Listener.
- If you turn on the switch, the configurations that you modify for a listener in the EDAS console override the configurations that you configure in the SLB console.
- If you turn off the switch, the modification in the EDAS console does not take effect. You must go to the SLB console to modify the configurations.
- After you configure a listener in the EDAS console, the vServer group for the listener is displayed in the console.