Collect logs of control plane components in ACK managed clusters

Updated at: 2025-03-28 08:05

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.

image

  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 Operations > Log Center.

  3. 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:

  • Query the logs of control plane components in the Cluster Information module.

    1. On the cluster details page, click the Basic Information tab, and click View next to Control Plane Component Logs.

    2. On the Log Center page, select the component to view its logs.

  • You can also query the logs of the four control plane components in the Operations module.

    1. In the left-side navigation pane of the cluster details page, choose Operations > Log Center.

    2. On the Log Center page, click the Control Plane Component Logs tab. You can select a component and view its logs.

  1. Log on to the SLS console. In the Projects section, click the project you want to manage.

  2. On the Log Storage > Logstores 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.

  1. On the Clusters page, find the cluster that you want to manage and click its name. In the left-side pane, choose Operations > Log Center.

  2. On the Log Center page, click the Logs of Control Plane Components tab, then click Close.

  • On this page (1)
  • Prerequisites
  • Enable the log collection feature for control plane components
  • Query the logs of control plane components
  • Logstores for control plane components
  • Disable the log collection feature for control plane components
  • Reference
Feedback
phone Contact Us

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

alicare alicarealicarealicare