You can collect logs of control plane components to manage your clusters in a more secure and efficient manner. Container Service for Kubernetes (ACK) allows you to collect logs of control plane components in ACK managed clusters to Simple Log Service (SLS) projects of your account. This way, you can manage and analyze logs in a centralized manner.
Prerequisites
Your Alibaba Cloud account has a sufficient quota of Logstores in SLS.
The collected logs are sent to the specified SLS projects of your account in the form of log streams. You are charged for SLS based on the pay-as-you-go billing method. For more information, see Pay-by-feature.
Enable the log collection feature for control plane components
You can enable log collection for control plane components by using one of the following methods. For more information about control plane components, see Control Plane Components.
Note
By default, the log collection feature is enabled for control plane components when you create ACK Pro clusters. You must manually enable the log collection feature for ACK Basic clusters.
Enable when you create a cluster
Enable in an existing cluster
When you create a cluster, select Enable for Control Plane Component Logs in the Component Configurations step. For more information about how to create an ACK cluster, see Create an ACK managed cluster.
Note
You can select an existing SLS project for the Control Plane Component Logs.

Log on to the ACK console. In the left-side navigation pane, click Clusters.
On the Clusters page, find the cluster that you want to manage and click its name. In the left-side pane, choose .
On the Log Center page, click the Control Plane Component Logs tab, and click Enable Component Log Collection.
Query the logs of control plane components
You can query the logs of control plane components in the ACK console or SLS console.
Note
You can query the logs of the kube-apiserver, kube-scheduler, kube-controller-manager, and Cloud Controller Manager control plane components. For more information, see Log search overview.
Query in the ACK console
Query in the SLS console
You can use one of the following methods to query the logs of control plane components in the ACK console:
Log on to the SLS console. In the Projects section, click the project you want to manage.
On the tab, click the logstore you want to manage.
Logstores for control plane components
You can collect logs of four control plane components in ACK clusters. Each SLS Logstore stores the logs of a control plane component. For more information about the components, see Kubernetes Components. The following table describes the four control plane components.
Component | Logstore | Description |
Component | Logstore | Description |
kube-apiserver | apiserver | kube-apiserver is a component of the Kubernetes control plane that exposes the Kubernetes API. For more information, see kube-apiserver. |
kube-controller-manager | kcm | kube-controller-manager is the internal management and control center of a Kubernetes cluster. The component embeds the core control links shipped with Kubernetes. For more information, see kube-controller-manager. |
kube-scheduler | scheduler | kube-scheduler is the default scheduler of a Kubernetes cluster For more information, see kube-scheduler. |
Cloud Controller Manager | ccm | Cloud Controller Manager allows you to integrate Kubernetes with Alibaba Cloud services, such as Classic Load Balancer (CLB) and Virtual Private Cloud (VPC). CLB is formerly known as Server Load Balancer (SLB). Cloud Controller Manager manages the features, such as load balancing and cross-node communication, that are provided by these services. For more information, see Cloud Controller Manager. |
Disable the log collection feature for control plane components
You can disable the log collection feature for control plane components in the Operations module in the ACK console.
On the Clusters page, find the cluster that you want to manage and click its name. In the left-side pane, choose .
On the Log Center page, click the Logs of Control Plane Components tab, then click Close.