All Products
Search
Document Center

Container Service for Kubernetes:Use the CCM in a registered cluster

Last Updated:Feb 18, 2025

The cloud controller manager (CCM) can integrate Kubernetes with basic services of Alibaba Cloud, such as Classic Load Balancer (CLB). This topic describes how to install and use the CCM in a registered cluster.

Prerequisites

Features

Manage CLB instances

If you set Type=LoadBalancer for a Service, the CCM automatically creates a CLB instance for the Service, and configures listeners and vServer groups. When the CCM identifies endpoint changes in the vServer groups associated with a Service or cluster node changes, the CCM automatically updates the vServer groups.

Note

The CLB vServer groups in this topic refer to nodes on Alibaba Cloud.

Install and use the CCM

onectl CLI

  1. Install onectl on your on-premises machine. For more information, see Use onectl to manage registered clusters.

  2. Run the following command to install the CCM:

    onectl addon install cloud-controller-manager

    Expected output:

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

ACK console

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

  2. On the Clusters page, find the cluster that you want to manage and click its name. In the left-side pane, choose Configurations > Secrets.

  3. On the Secrets page, click Create from YAML. Fill in the following sample code to create a Secret named alibaba-addon-secret.

    Note

    Components access cloud services using the stored AccessKeyID and AccessKeySecret. Skip this step If an alibaba-addon-secret already exists.

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

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

After the CCM is installed, you can use the CCM in the following ways.