Collect control plane logs for ACS clusters

更新时间:
复制 MD 格式

Alibaba Cloud Container Compute Service (ACS) supports collecting logs from the control plane components of a cluster and sending them to a project in Simple Log Service (SLS) under your account. This topic describes how to enable log collection for control plane components and how to view the collected logs.

Prerequisites

Your account has a sufficient quota for Logstores in Simple Log Service (SLS).

Note

The default Logstore quota for an account is 50. If the quota is insufficient, submit a ticket to Simple Log Service to request a quota increase.

Background information

Logs from control plane components help you operate and maintain your cluster securely and efficiently. The component logs are sent as log streams to a specified project in Simple Log Service (SLS) under your account and are billed on a pay-as-you-go basis. For more information, see Billing of pay-as-you-go.

Enable control plane component logs

You can enable log collection for control plane components in the following ways.

Enable for an existing cluster

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

  2. On the Clusters page, click the name of the target cluster. In the left navigation pane, choose Operations > Log Center.

  3. On the Control Plane Component Logs tab, click Enable Component Log Collection.

View control plane component logs

After you create an ACS cluster, you can view its control plane component logs in one of the following ways.

Simple Log Service console

  1. Log on to the Simple Log Service console.

  2. In the Projects section, click the name of the project for your target cluster.

  3. On the Log Storage page, in the Logstores list on the left, select the Logstore for the target control plane component.

ACS console

Use one of the following methods to view logs for the three supported control plane components.

  • From the Cluster Information page

    1. On the Cluster Information page, click the Basic Information tab. For Control Plane Component Logs in the list, click View on the right.

    2. You are redirected to the Log Storage page in the Simple Log Service console. In the Logstores list on the left, select the Logstore for the target control plane component.

  • From the Operations menu

    1. On the Clusters page, click the name of the target cluster. In the left navigation pane, choose Operations > Log Center.

    2. Click the Control Plane Component Logs tab, and then select a component to view its logs.

Control plane component Logstores

ACS supports log collection for the following three control plane components. Each Logstore corresponds to a Kubernetes control plane component. For more information about the components, see Kubernetes Components.

Component

Logstore

Description

kube-apiserver

apiserver

The kube-apiserver component exposes the Kubernetes API. It is the front end for the Kubernetes control plane. For more information, see kube-apiserver.

kube-controller-manager

kcm

The kube-controller-manager component is the core control center of a Kubernetes cluster and embeds the key control loops shipped with Kubernetes. For more information, see kube-controller-manager.

Cloud Controller Manager

ccm

The Cloud Controller Manager integrates Kubernetes with Alibaba Cloud infrastructure services, such as Classic Load Balancer (CLB) and Virtual Private Cloud (VPC). CLB was formerly known as Server Load Balancer (SLB). It manages features such as load balancing and cross-node communication. For more information, see Cloud Controller Manager.

Disable control plane component logs

You can disable this feature from the Operations menu.

  1. On the Clusters page, click the name of the target cluster. In the left navigation pane, choose Operations > Log Center.

  2. On the Control Plane Component Logs tab, click Close in the upper-right corner.

  3. In the dialog box that appears, click OK.