The public preview of Alibaba Cloud Kubernetes Monitoring starts on June 18, 2021. During the public preview, you can use Kubernetes Monitoring free of charge. If you have questions, contact the Kubernetes Monitoring DingTalk group 35568145
to request technical support. This topic describes how to install the Kubernetes Monitoring agent.
Prerequisites
- Application Real-Time Monitoring Service (ARMS) is activated. For more information, see Activate and upgrade ARMS.
- A Kubernetes cluster is created. Kubernetes Monitoring supports only Container Service for Kubernetes (ACK) clusters and registered Kubernetes clusters. For more information about how to create each type of cluster, see the following topics:
- Kubernetes Monitoring can run in the current environment. For more information, see Environment requirements and limits.
Description
To enable Kubernetes Monitoring for a Kubernetes cluster, install the following agents:
- The Prometheus Service agent
Note The metrics of Kubernetes Monitoring are collected by Prometheus Service. Therefore, you must install the Prometheus Service agent. For more information about the relationship between Kubernetes Monitoring and Prometheus Service, see Comparison between Kubernetes Monitoring and other ARMS services.
- The Kubernetes Monitoring agent
Before you install the Kubernetes Monitoring agent, you must check whether ARMS Addon Token exists in the Kubernetes cluster that you want to manage. If ARMS Addon Token does not exist, an error occurs due to insufficient permissions. If ARMS Addon Token exists, ARMS performs password-free authorization. After the agent is installed, you can use Kubernetes Monitoring. If ARMS Addon Token does not exist, you must attach permission policies on ARMS and Tracing Analysis to the RAM role.
The following section describes how to check whether ARMS Addon Token exists and how to attach permission policies:
- Log on to the ACK console.
- On the Clusters page, find the cluster that you want to manage, and click the cluster name.
- In the left-side navigation pane, choose Configurations > Secrets.
- In the upper part of the page, select kube-system from the Namespace drop-down list and check whether addon.arms.token exists.
- Log on to the ACK console.
- In the left-side navigation pane of the ACK console, click Clusters.
- On the Clusters page, click the name of the cluster that you want to manage.
- In the left-side navigation pane, click Cluster Information. On the page that appears, click the Cluster Resources tab.
- On the Cluster Resources tab, click the link on the right side of Worker RAM Role.
- On the Permissions tab, click Add Permissions.
- In the Select Policy section of the Add Permissions panel, enter the keywords of the following policies in the search box. Click the
policies to add them to the Selected list on the right side of the section. Then, click OK.
- AliyunTracingAnalysisFullAccess: grants full permissions on Tracing Analysis.
- AliyunARMSFullAccess: grants full permissions on ARMS.
Note- ARMS Addon Token may not exist in some ACK managed clusters. If you use an ACK managed cluster, we recommend that you first check whether ARMS Addon Token exists. If ARMS Addon Token does not exist, you must manually grant permissions.
- By default, ACK dedicated clusters do not have ARMS Addon Token. You must manually grant permissions.
- By default, registered clusters do not have ARMS Addon Token. You must manually grant permissions. Registered clusters do not have a worker RAM role. You cannot manually attach permission policies on ARMS and Tracing Analysis to the RAM role. For more information about how to install the Kubernetes Monitoring agent for a registered cluster, see Install the agent for a registered cluster.
Use one of the following methods to install the Kubernetes Monitoring agent:
Method 1: Enable Kubernetes Monitoring on the Cluster Topology page in the ACK console
- Install the Prometheus Service agent.
- Install the Kubernetes Monitoring agent.
Method 2: Enable Kubernetes Monitoring on the Kubernetes Monitoring page in the ARMS console
- Install the Prometheus Service agent.
- Install the ARMS Kubernetes Monitoring agent.
- Optional:Install the ARMS Application Monitoring agent.