Updated on 2024-12-16 GMT+08:00

Installing Metrics Server

metrics-server is an aggregator for monitoring data of core cluster resources. After installing it, you can create HPA policies. For details, see Configuring an HPA Policy.

For details about the official projects and documents of the Metrics Server community, see https://github.com/kubernetes-sigs/metrics-server.

This section describes how to install Metrics Server for a CCE cluster bound to a Kubernetes environment.

Prerequisites

  1. A Kubernetes environment has been created. For details, see Creating a Kubernetes Environment in Resource Management Mode.
  2. A CCE cluster later than 1.15 has been bound in the environment. For details, see Binding a CCE Cluster.

Installing Metrics Server

  1. Log in to ServiceStage.
  2. Choose Environment Management. The Environment Management page is displayed.
  3. Click the target environment. The Overview page is displayed.
  4. Choose Plug-in Management.
  5. Select Metrics Server under Addons.

    • For a non-HA environment, click install and then go to 6.
    • For an HA environment, select the AZ where the CCE cluster on which the Metrics Server plug-in is to be installed is located, and go to 6.

  6. Set the parameters by referring to the following table.

    Parameter

    Description

    CCE Cluster

    By default, a managed CCE cluster in the current environment is selected.

    Server Type

    CPU architecture of the CCE cluster.

    • x86_64
    • aarch64

  7. Click OK.

    • After the Metrics Server plug-in is successfully installed, the content listed in the following table is created.

      Name

      Description

      Workloads

      In namespace kube-system of the CCE cluster selected in 6, create a workload named metrics-server.

      Services

      In namespace kube-system of the CCE cluster selected in 6, create a service named metrics-server.

    • If the Metrics Server plug-in fails to be installed, try again by referring to Installing Metrics Server.