Configure CronHPA

For stateless applications with periodic fluctuations in business usage, CronHPA (Cron Horizontal Pod Autoscaler) supports adjusting the number of pods based on the time policies you set.

Prerequisites

Please ensure that the current cluster has deployed monitoring components and that the monitoring components are operating normally. You can check the deployment and health status of the monitoring components by clicking on the upper right corner of the platform expand > Platform Health Status, to view the deployment and health status of the monitoring components..

Steps

  1. Enter Container Platform.

  2. In the left navigation bar, click Workloads -> Deployments.

  3. Click on Deployment Name.

  4. Scroll down to the Elastic Scaling section and click Update on the right.

  5. Select Scheduled Scaling, and configure the scaling rules. When the type is Custom, you must provide a Crontab expression for the trigger condition, formatted as minute hour day month week. For detailed introduction, please refer to Writing Crontab Expressions.

  6. Click Update.

Calculation Rule Explanation

  1. Indicates that starting from 01:00 AM every Monday, only 1 pod will be retained.
  2. Indicates that starting from 02:00 AM every Tuesday, only 2 pods will be retained.
  3. Indicates that starting from 02:00 AM every Tuesday, only 3 pods will be retained.

Note: When multiple rules have the same trigger time (Examples 2 and 3), the platform will execute automatic scaling based only on the rule that is higher in priority (Example 2).