Container Service for Kubernetes (ACK) clusters allow you to reuse Server Load Balancer (SLB) instances. You can bind one SLB 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.
    Notice If you do not upgrade the CCM component of the ACK cluster, the SLB instance fails to be reused, the existing listeners of the SLB instance are deleted and the application traffic drops to zero.
  • An SLB instance is created. For more information, see Create a CLB instance.
    Notice
    • If you choose to create an SLB instance when you bind an SLB instance to an application on the Application Overview page, EDAS puchases an SLB instance for you. This SLB instance cannot be reused.
    • The created SLB instance must be in the same virtual private cloud (VPC) as the application to which the SLB instance is to be bound.
  • The limits of using SLB are learned. For more information, see Limits.

Background information

To bind an SLB instance to an application, you must modify the configurations of listeners for the SLB instance in the EDAS console.

Notice You cannot modify the configurations of the listeners and certificates in the SLB console. Otherwise, the modification may fail and make the application inaccessible.

The differences in binding SLB instances to applications in ACK clusters and user-created Kubernetes clusters involve the following aspects:

  • User-created Kubernetes cluster: You must purchase a new SLB instance for each application. Each application exclusively uses an SLB instance.
  • ACK cluster: You can purchase a new SLB instance for each application or use an existing SLB instance that is bound to other applications. If a newly purchased SLB instance is used for an application, the application exclusively uses the SLB instance.

Reuse an SLB instance

To reuse an SLB instance, bind an existing SLB instance to an application. The procedure for binding an existing SLB instance is the same as that for binding a new SLB instance. The difference lies only in selecting an SLB instance. For more information about the procedure, see Bind SLB instances. This section describes the items that you need to take note of when you reuse an SLB instance.

  • You must select an SLB instance that is created in the SLB console. You cannot reuse an SLB instance that is purchased in the EDAS console.
  • You must select an unoccupied container port when you configure a listener.
  • When you bind an SLB instance to an application, you can select whether to enable listener overriding.

    To reuse an SLB instance, you must configure a listener for the application to which the SLB instance is bind. When you configure an SLB instance, you can turn on or off Overwrite Listener.

    SLB - Reuse an SLB instance
    • 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.
Note The specification metrics of an SLB instance include Maximum Connections, New Connections Per Second, and Queries Per Second. If the number of access requests to the application exceeds the value of a specification metric of the SLB instance, you can bind more SLB instances to share the traffic pressure.