Bu sayfa henüz yerel dilinizde mevcut değildir. Daha fazla dil seçeneği eklemek için yoğun bir şekilde çalışıyoruz. Desteğiniz için teşekkür ederiz.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Configuring an HPA Policy

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

In Kubernetes, a HorizontalPodAutoscaler is a built-in component that provides horizontal pod autoscaling (HPA). It supports the application-level cooldown time window and scaling threshold functions based on the Kubernetes HPA.

Prerequisites

HPA policies can be configured only for stateless container-deployed components whose status is Running or Not ready and CCE cluster version is later than 1.15. For details about how to check the component status, see Viewing Component Details.

Configuring an HPA Policy

  1. Log in to ServiceStage.
  2. Use either of the following methods to go to the Scaling page.

    • On the Application Management page, click the application to which the component belongs, click the target component in Component List, and choose Scaling in the left navigation pane.
    • On the Component Management page, click the target component and choose Scaling in the left navigation pane.
    NOTE:

    If the component is created by Creating a Component by Importing a CCE Workload and is not enabled:

    1. In the displayed dialog box, click OK.
    2. On the Enable Component page, click Enable and wait until the component is restarted.

  3. On the Scaling page, click next to Auto Scaling by HPA to enable auto scaling policy configuration. The Policy page is displayed.

    • If metrics-server is not installed in the CCE cluster, go to 4.
    • If metrics-server has been installed in the CCE cluster, go to 6.

  4. Click Configure Now to install the metrics-server add-on on the CCE console.

    Install the metrics-server add-on for the CCE cluster. For details, see Installing Metrics Server.

  5. After the add-on is installed, return to the Policy page and click refresh.
  6. Configure the scaling policy.

    1. Policy Name

      Enter a policy name. After the policy is configured, its name cannot be changed.

      Enter 4 to 63 characters. Start with a lowercase letter and end with a lowercase letter or digit. Only use lowercase letters, digits, and hyphens (-).

    2. Pod Range

      Enter the minimum and maximum numbers of pods. The minimum number is an integer ranging from 1 to 299. The maximum number is an integer ranging from 1 to 1500 and must be greater than the minimum number.

      After the policy is triggered, the workload pods are scaled within this range.

    3. Scaling Behavior
    4. Triggering Condition

      You can configure trigger condition on the UI or by editing the YAML file.

      Before setting trigger conditions of CPU usage and Memory usage, you need to set the CPU quota (CPU) and memory quota (Memory) for the component. To modify the quotas, click Increase quota, set component resource parameters by referring to 5, and upgrade the component.

      • UI

        Set Desired Value and Threshold (scale-in and scale-out thresholds) of CPU usage and Memory usage.

        After the policy is triggered, the number of instances to be scaled is calculated by rounding up the value of (Current CPU or memory usage/Expected value x Number of running instances).

        • Scale-in is triggered when the current CPU or memory usage is less than the scale-in threshold.
        • Scale-out is triggered when the current CPU or memory usage is greater than the scale-out threshold.
      • YAML
         metrics:
           - type: Resource
             resource:
               name: cpu
               target:
                 type: Utilization
                 averageUtilization: 50
           - type: Resource
             resource:
               name: memory
               target:
                 type: Utilization
                 averageUtilization: 50
           - type: Pods
             pods:
               metric:
                 name: packets-per-second
               target:
                 type: AverageValue
                 averageValue: 1k
           - type: Object
             object:
               metric:
                 name: requests-per-second
               describedObject:
                 apiVersion: networking.k8s.io/v1beta1
                 kind: Ingress
                 name: main-route
               target:
                 type: Value
                 value: 10k

        As shown in the preceding example, in addition to using the CPU and memory usage as metrics, you can use the YAML format to customize metric parameters and support more metrics such as pods, object, and external.

        NOTE:

        To configure custom metric parameters by using YAML, ensure that the prometheus add-on has been installed for the CCE cluster.

        Install the prometheus add-on for the CCE cluster. For details, see prometheus.

  7. Click OK.

Follow-up Operations

After the HPA policy is configured, you can perform the following operations based on service requirements:

Sitemizi ve deneyiminizi iyileştirmek için çerezleri kullanırız. Sitemizde tarama yapmaya devam ederek çerez politikamızı kabul etmiş olursunuz. Daha fazla bilgi edinin

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback