Use CCM in Registered Clusters

Updated at:

Cloud Controller Manager (CCM) integrates a registered cluster with Alibaba Cloud services. When you create a Kubernetes Service with type: LoadBalancer, CCM automatically provisions and manages a Classic Load Balancer (CLB) instance—including listeners and backend server groups—and keeps it in sync as endpoints and nodes change.

Note

CCM adds only cloud nodes to the CLB backend. On-premises nodes in the registered cluster are not included.

Prerequisites

Before you begin, ensure that you have:

How CCM manages load balancers

When you create a Service with type: LoadBalancer, CCM:

  1. Creates a CLB instance and attaches listeners and backend server groups.

  2. Registers cloud nodes in the cluster as CLB backends.

  3. Automatically updates the CLB backend whenever a Service endpoint or a cloud node changes.

Install CCM

Choose one of the following methods.

Install by using onectl

  1. Install onectl on your on-premises machine. See Use onectl to manage registered clusters.

  2. Run the following command:

    onectl addon install cloud-controller-manager

    Expected output:

    Addon cloud-controller-manager, version **** installed.

Install by using the console

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

  2. Click the name of your cluster. In the left navigation pane, choose Configurations > Secrets.

  3. On the Secrets page, click Create from YAML and enter the following content to create a Secret named alibaba-addon-secret.

    Note

    CCM uses the AccessKey ID and AccessKey secret stored in this Secret to call Alibaba Cloud APIs. Skip this step if the alibaba-addon-secret Secret already exists.

    apiVersion: v1
    kind: Secret
    metadata:
      name: alibaba-addon-secret
      namespace: kube-system
    type: Opaque
    stringData:
      access-key-id: <The AccessKey ID of the RAM user>
      access-key-secret: <The AccessKey secret of the RAM user>
  4. In the left navigation pane, choose Operations > Add-ons.

  5. On the Add-ons page, find the Cloud Controller Manager managed component and click Install in the lower-right corner of the card.

What's next