The logs of control plane components can help you efficiently and securely manage and maintain clusters. ACK Edge lets you collect the logs of control plane components from an ACK Edge cluster to a Simple Log Service project within your Alibaba Cloud account. You can manage and analyze these logs in Simple Log Service.
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
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, find the cluster you want 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.
Wait for the system to install the log collection component. After installation is complete, the collected logs will be displayed.
Query the logs of control plane components
You can query the logs of control plane components in the ACK console or SLS console. For more information about query syntax, see Index-based query and analysis.
Use the ACK console to view logs
You can use the following methods to view the logs of control plane components.
View the logs of control plane components from the Cluster Information menu.
On the cluster details page, click the Basic Information tab and click the View on the right-side of the Control Plane Component Logs.
Select a component and view its logs using the drop-down menu on the upper-left corner.
View the logs of control plane components from the Operations menu.
In the navigation pane on the left of the cluster details page, choose .
Select a component and view its logs using the drop-down menu on the upper-left corner.
Use the Simple Log Service console to view logs
Log on to the Simple Log Service console.
In the Projects section, click the name of the Simple Log Service project that is used by the ACK cluster.
In the list, select the Logstore that stores the logs of control plane components.
Logstores for control plane components
You can collect logs of the following 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.
Component | Logstore | Whether to collect logs by default | Description |
apiserver | Yes | kube-apiserver is a component of the Kubernetes control plane that exposes the Kubernetes API. | |
kcm | Yes | kube-controller-manager is the internal management and control center of a Kubernetes cluster. The component embeds the core control links shipped with Kubernetes. | |
scheduler | Yes | kube-scheduler is the default scheduler of a Kubernetes cluster. | |
ccm | Yes | 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. | |
controlplane-events | controlplane-events | Yes | controlplane-events delivers operational events of cluster control plane components, such as out of memory (OOM) killed events. |
alb | Yes | ALB Ingress provides a unified entry for Services in a cluster based on Application Load Balancer (ALB) of Alibaba Cloud. | |
cluster-autoscaler | No | cluster-autoscaler is the node autoscaling component for ACK. | |
ack-goatscaler | No | ack-goatscaler is the instant elasticity component for ACK nodes. | |
kuberay-operator | No | kuberay-operator is based on the community KubeRay component and combines the scheduling, elastic quota, resource priority scheduling, and other capabilities of ACK to help you manage and use Ray cluster services more conveniently. |
If the Whether to collect logs by default column of the component is No and you want to collect logs from the component, you must enable log collection for the component by updating the list of components for log collection.
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 you want and click its name. In the left-side pane, choose .
On the Log Center page, click the Control Plane Component Logs tab, then click Close.