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
DocumentaçãoTencent Kubernetes EngineUse CasesAuto ScalingKEDAScheduled Horizontal Scaling (Cron Triggers)

Scheduled Horizontal Scaling (Cron Triggers)

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2024-12-24 15:55:02

Cron Triggers

Kubernetes-based Event-Driven Autoscaler (KEDA) supports Cron triggers, enabling the configuration of periodic scheduled scaling with Cron expressions. For details, please refer to KEDA Scalers: Cron.
Cron triggers are suitable for businesses with periodic characteristics, such as business traffic with fixed periodic peaks and troughs.

Use Cases

Daily Fixed-time Flash Sales Activities

The characteristic of a flash sales activity is that the time is relatively fixed, allowing for scaling out in advance before the activity begins. Below is an example configuration of ScaledObject.
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: seckill
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: seckill
pollingInterval: 15
minReplicaCount: 2 # Keep at least 2 replicas
maxReplicaCount: 1000
advanced:
horizontalPodAutoscalerConfig:
behavior: # Control scaling behavior by using a conservative approach of quick scaling out and slow scaling in
scaleDown: # Slow scaling in: A period of at least 10 minutes is required before scaling in
stabilizationWindowSeconds: 600
policies:
- type: Percent
value: 100
periodSeconds: 15
scaleUp: # Quick scaling out: Allow scaling out up to 5 times every 15s
policies:
- type: Percent
value: 500
periodSeconds: 15
triggers:
- type: cron # Ensure at least 200 replicas within half an hour before and after the flash sales activity every morning at 10 am
metadata:
timezone: Asia/Shanghai
start: 30 9 * * *
end: 30 10 * * *
desiredReplicas: "200"
- type: cron # Ensure at least 200 replicas within half an hour before and after the flash sales activity every evening at 6 pm
metadata:
timezone: Asia/Shanghai
start: 30 17 * * *
end: 30 18 * * *
desiredReplicas: "200"
- type: memory # Scale up when the CPU utilization exceeds 60%
metricType: Utilization
metadata:
value: "60"
- type: cpu # Scale up when the memory utilization exceeds 60%
metricType: Utilization
metadata:
value: "60"

Notes

Usually, the triggers cannot be configured with Cron alone and need to be used in conjunction with other triggers. This is because if no other triggers are active outside the Cron's start and end interval, the number of replicas will drop to minReplicaCount.



Ajuda e Suporte

Esta página foi útil?

comentários