The alibaba-cloud-metrics-adapter component collects metrics from your cluster. Horizontal Pod Autoscaler (HPA) can scale your application pods based on the collected metrics. This topic describes how to deploy alibaba-cloud-metrics-adapter in a registered cluster in the Container Service for Kubernetes (ACK) console.
Prerequisites
An ACK One registered cluster is created and an external Kubernetes cluster deployed in an on-premises data center is connected to the ACK One registered cluster.
Background information
In Kubernetes, metrics are collected to monitor resources. In addition, HPA scales the number of pods based on the collected metrics. To meet the diverse monitoring requirements of developers, Kubernetes defines APIs that are used to collect the following types of metrics: resource metrics, custom metrics, and external metrics.
Resource metrics are collected by using the metrics-server component. The collected metrics are used to monitor the usage of Kubernetes resources, such as pods, nodes, and namespaces.
Custom metrics are collected by using Application Real-Time Monitoring Service (ARMS) Prometheus. HPA scales application pods based on the collected custom metrics.
External metrics are collected by using the external metrics API provided by the cloud service provider. These metrics are used to monitor the external environment. For example, you can monitor the queries per second (QPS) to an Ingress and use HPA to scale application pods when the QPS exceeds the scaling threshold.
Procedure
Log on to the ACK console.
In the left-side navigation pane of the ACK console, choose .
On the Marketplace page, click the App Catalog tab. Find and click ack-alibaba-cloud-metrics-adapter.
On the ack-alibaba-cloud-metrics-adapter page, click Deploy.
In the Deploy wizard, select a cluster and namespace, and then click Next.
Use the default values for the Namespace and Release Name parameters.
On the Parameters wizard page, set the parameters and click OK.
Parameter
Description
AccessKeyId
The AccessKey ID of your Alibaba Cloud account.
AccessKeySecret
The AccessKey secret of your Alibaba Cloud account.
Region
The region where your cluster is deployed, for example, cn-qingdao or ap-southeast-1.
NoteIf an Express Connect circuit is deployed between the cluster and the virtual private cloud (VPC) where the cluster resides, the Express Connect circuit is automatically used.