Updated on 2025-08-05 GMT+08:00

Managing Metrics Server

Metrics Server is an aggregator for monitoring data of core cluster resources. For details about the official projects and documents of the Metrics Server community, see https://github.com/kubernetes-sigs/metrics-server.

After installing Metrics Server, you can create HPA policies. For details, see Managing HPA Policies.

Prerequisites

A CCE cluster later than 1.15 has been bound in the environment. For details, see Binding a 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 cluster in which the Metrics Server plug-in is to be installed is located, and go to 6.

  6. Set parameters by referring to the following table.

    Parameter

    Description

    CCE Cluster

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

    Server Type

    Select the same CPU architecture as the master node of the selected 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 cluster selected in 6, create a workload named metrics-server.

      Services

      In namespace kube-system of the 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 Reinstalling Metrics Server.

Upgrading Metrics Server

Upgrade the Metrics Server plug-in to the latest version.

Auto scaling is unavailable during the Metrics Server plug-in upgrade. If the traffic is abnormal during this period, the component service may be abnormal.

  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 Upgrade.
    • For an HA environment, click the AZ tab of the cluster where the Metrics Server plug-in is to be upgraded, and click Upgrade.

  6. In the displayed dialog box, click OK.

Restarting the Metrics Server Load Process

Restart the Metrics Server load process.

Auto scaling is unavailable during the Metrics Server load startup. If the traffic is abnormal during this period, the component service may be abnormal.

  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 Restart.
    • For an HA environment, click the AZ tab of the cluster where the Metrics Server plug-in is to be restarted, and click Restart.

  6. In the displayed dialog box, click OK.

Reinstalling Metrics Server

Reinstall Metrics Server if it fails to be installed.

  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 Redeploy.
    • For an HA environment, click the AZ tab of the cluster where the Metrics Server plug-in fails to be installed, and click Redeploy.

Deleting Metrics Server

If the Metrics Server plug-in is deleted, the content listed in the following table is deleted.

Name

Description

Workloads

metrics-server workload created in the kube-system namespace of the cluster selected when Installing Metrics Server. For details about workloads, see Overview.

Services

metrics-server service created in the kube-system namespace of the cluster selected when Installing Metrics Server. For details about services, see Overview.

After the Metrics Server plug-in is deleted, the HPA policy cannot be used for component instance auto scaling.

  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 Delete.
    • For an HA environment, click the AZ tab of the cluster where the Metrics Server plug-in is to be deleted, and click Delete.

  6. Click OK.