tencent cloud

Tencent Kubernetes Engine

Release Notes and Announcements
Release Notes
Announcements
Release Notes
Product Introduction
Overview
Strengths
Architecture
Scenarios
Features
Concepts
Native Kubernetes Terms
Common High-Risk Operations
Regions and Availability Zones
Service Regions and Service Providers
Open Source Components
Purchase Guide
Purchase Instructions
Purchase a TKE General Cluster
Purchasing Native Nodes
Purchasing a Super Node
Getting Started
Beginner’s Guide
Quickly Creating a Standard Cluster
Examples
Container Application Deployment Check List
Cluster Configuration
General Cluster Overview
Cluster Management
Network Management
Storage Management
Node Management
GPU Resource Management
Remote Terminals
Application Configuration
Workload Management
Service and Configuration Management
Component and Application Management
Auto Scaling
Container Login Methods
Observability Configuration
Ops Observability
Cost Insights and Optimization
Scheduler Configuration
Scheduling Component Overview
Resource Utilization Optimization Scheduling
Business Priority Assurance Scheduling
QoS Awareness Scheduling
Security and Stability
TKE Security Group Settings
Identity Authentication and Authorization
Application Security
Multi-cluster Management
Planned Upgrade
Backup Center
Cloud Native Service Guide
Cloud Service for etcd
TMP
TKE Serverless Cluster Guide
TKE Registered Cluster Guide
Use Cases
Cluster
Serverless Cluster
Scheduling
Security
Service Deployment
Network
Release
Logs
Monitoring
OPS
Terraform
DevOps
Auto Scaling
Containerization
Microservice
Cost Management
Hybrid Cloud
AI
Troubleshooting
Disk Full
High Workload
Memory Fragmentation
Cluster DNS Troubleshooting
Cluster kube-proxy Troubleshooting
Cluster API Server Inaccessibility Troubleshooting
Service and Ingress Inaccessibility Troubleshooting
Common Service & Ingress Errors and Solutions
Engel Ingres appears in Connechtin Reverside
CLB Ingress Creation Error
Troubleshooting for Pod Network Inaccessibility
Pod Status Exception and Handling
Authorizing Tencent Cloud OPS Team for Troubleshooting
CLB Loopback
API Documentation
History
Introduction
API Category
Making API Requests
Elastic Cluster APIs
Resource Reserved Coupon APIs
Cluster APIs
Third-party Node APIs
Relevant APIs for Addon
Network APIs
Node APIs
Node Pool APIs
TKE Edge Cluster APIs
Cloud Native Monitoring APIs
Scaling group APIs
Super Node APIs
Other APIs
Data Types
Error Codes
TKE API 2022-05-01
FAQs
TKE General Cluster
TKE Serverless Cluster
About OPS
Hidden Danger Handling
About Services
Image Repositories
About Remote Terminals
Event FAQs
Resource Management
Service Agreement
TKE Service Level Agreement
TKE Serverless Service Level Agreement
Contact Us
Glossary

HPA Metrics

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-01-29 14:17:29
Horizontal Pod Autoscaler (HPA) can automatically scale the number of Pods for services according to the average CPU utilization of target Pods and other metrics. You can set auto-scaling triggering metrics in the console including CPU, memory, disk, network, and GPU metrics. You can also use these metrics when creating and editing HPAs with YAML files. This document provides an example of configuring a YAML file.

Autoscaling Metrics

The following tables list the details of the autoscaling metrics:
Note:
Each variable under metricName has its own unit which is listed in the default unit column. You can omit such units when compiling the YAML file.

CPU metrics

Metric Name
in the Console
Unit
in the Console
Remarks
Type
metricName
Default Unit
CPU Usage
Core
Number of CPU cores used by the Pod
Pods
k8s_pod_cpu_core_used
Core
CPU Utilization
(per node)
%
Percentage of total CPU of the node used by the Pod
Pods
k8s_pod_rate_cpu_core_used_node
%
CPU Utilization
(per Request)
%
Ratio of the total number of CPU cores used by the Pod and the value of Request specified by the container in the Pod
Pods
k8s_pod_rate_cpu_core_used_request
%
CPU Utilization
(per Limit)
%
Ratio of the total number of CPU cores used by the Pod and the sum of Limit specified by the container in the Pod
Pods
k8s_pod_rate_cpu_core_used_limit
%

Disk metrics

Metric Name
in the Console
Unit
in the Console
Remarks
Type
metricName
Default Unit
Disk Write Traffic
KB/s
Pod's disk write rate
Pods
k8s_pod_fs_write_bytes
B/s
Disk Read Traffic
KB/s
Pod's disk read rate
Pods
k8s_pod_fs_read_bytes
B/s
Disk Read IOPS
Times/s
Number of I/O times Pod reads data from disk
Pods
k8s_pod_fs_read_times
Times/s
Disk Write IOPS
Times/s
Number of I/O times Pod writes data to disk
Pods
k8s_pod_fs_write_times
Times/s

Network metrics

Metric Name
in the Console
Unit
in the Console
Remarks
Type
metricName
Default Unit
Network bandwidth in
Mbps
Sum of inbound bandwidth of all containers per Pod
Pods
k8s_pod_network_receive_bytes_bw
Bps
Network bandwidth out
Mbps
Sum of outbound bandwidth of all containers per Pod
Pods
k8s_pod_network_transmit_bytes_bw
Bps
Network traffic in
KB
Sum of inbound traffic of all containers per Pod
Pods
k8s_pod_network_receive_bytes
B
Network traffic out
KB
Sum of outbound traffic of all containers per Pod
Pods
k8s_pod_network_transmit_bytes
B
Network packets in
Count/s
Sum of inbound packets of all containers per Pod
Pods
k8s_pod_network_receive_packets
Count/s
Network packets out
Count/s
Sum of outbound packets of all containers per Pod
Pods
k8s_pod_network_transmit_packets
Count/s

Memory metrics

Metric Name
in the Console
Unit
in the Console
Remarks
Type
metricName
Default Unit
Memory Usage
MiB
Amount of memory used by the Pod
Pods
k8s_pod_mem_usage_bytes
B
Memory Usage (excluding cache)
MiB
Pod memory usage, excluding cache
Pods
k8s_pod_mem_no_cache_bytes
B
Memory Utilization (per node)
%
Percentage of total memory of the node used by the Pod
Pods
k8s_pod_rate_mem_usage_node
%
Memory Utilization (per node, excluding cache)
%
Percentage of total memory of the node used by the Pod, excluding cache
Pods
k8s_pod_rate_mem_no_cache_node
%
Memory Utilization (per Request)
%
Percentage of total memory of the Request used by the Pod
Pods
k8s_pod_rate_mem_usage_request
%
Memory Utilization (per Request, excluding cache)
%
Percentage of total memory of the Request used by the Pod, excluding cache
Pods
k8s_pod_rate_mem_no_cache_request
%
Memory Utilization (per Limit)
%
Percentage of Pod memory usage to the Limit value
Pods
k8s_pod_rate_mem_usage_limit
%
Memory Utilization (per Limit, excluding cache)
%
Percentage of Pod memory usage to the Limit value, excluding cache
Pods
k8s_pod_rate_mem_no_cache_limit
%

GPU

Note:
The following GPU-related triggering metrics can only be used in TKE Serverless clusters.
Metric Name
in the Console
Unit
in the Console
Remarks
Type
metricName
Default Unit
GPU Usage
CUDA Core
Pod GPU usage
Pods
k8s_pod_gpu_used
CUDA Core
GPU Applications
CUDA Core
Pod GPU applications
Pods
k8s_pod_gpu_request
CUDA Core
GPU Utilization (per Request)
%
Percentage of GPU usage to the Request value
Pods
k8s_pod_rate_gpu_used_request
%
GPU Utilization (per node)
%
GPU usage percentage in the node
Pods
k8s_pod_rate_gpu_used_node
%
GPU Memory Usage
MiB
Pod GPU memory usage
Pods
k8s_pod_gpu_memory_used_bytes
B
GPU Memory Applications
MiB
Pod GPU memory applications
Pods
k8s_pod_gpu_memory_request_bytes
B
GPU Memory Utilization (per Request)
%
Percentage of GPU memory usage to the Request value
Pods
k8s_pod_rate_gpu_memory_used_request
%
GPU Memory Utilization (per node)
%
GPU memory usage percentage in the node
Pods
k8s_pod_rate_gpu_memory_used_node
%

Creating and Editing an HPA by Using a YAML File

You can create and edit an HPA by using a YAML file. The following example shows a configuration file that defines an HPA named "example". The HPA enables the system to trigger HPA for 1 or 2 Pods when the CPU usage reaches 1.
Note:
TKE is compatible with the native resource types.
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: example
namespace: default
labels:
qcloud-app: example
spec:
minReplicas: 1
maxReplicas: 2
metrics:
- type: Pods# Support using Resource
pods:
metricName: k8s_pod_cpu_core_used
targetAverageValue: "1"
scaleTargetRef:
apiVersion: apps/v1beta2
kind: Deployment
name: nginx


Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan