Updated on 2024-09-30 GMT+08:00

Kubernetes Metrics Server

Kubernetes provides resource usage metrics, such as container CPU usage and memory usage, through the Metrics API. These metrics can be directly accessed by users (by running the kubectl top command) or used by a controller in the cluster (for example, HPA) to make decisions.

Kubernetes Metrics Server is an aggregator for monitoring data of core cluster resources. You can quickly install this add-on on the CCE console.

After this add-on is installed, you can create HPA policies. For details, see HPA Policies.

The official community project and documentation are available at https://github.com/kubernetes-sigs/metrics-server.

Editing the Add-on

  1. Log in to the CCE console and click the cluster name to access the cluster console. In the navigation pane on the left, choose Add-ons. Locate Kubernetes Metrics Server on the right and click Edit.
  2. On the Edit Add-on page, modify the specifications.

    Table 1 Kubernetes Metrics Server specifications

    Parameter

    Description

    Pods

    Number of pods for the add-on.

    Containers

    CPU and memory quotas of the containers for running the add-on.

  3. Click Install.

Components

Table 2 metrics-server components

Component

Description

Resource Type

metrics-server

Aggregator for the monitored data of cluster core resources, which is used to collect and aggregate resource usage metrics obtained through the Metrics API in the cluster

Deployment