下面是扩展pod的样例HPA配置,但没有提到时间持续时间。所以我想知道下一次缩放事件之间的持续时间。
containerResource:
name: cpu
container: application
target:
type: Utilization
averageUtilization: 60
默认冷却时间为5分钟
我们可以配置
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: example-deployment
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: example-deployment
minReplicas: 1
maxReplicas: 10
behavior:
scaleDown:
selectPolicy: Disabled
scaleUp:
stabilizationWindowSeconds: 120
policies:
- type: Percent
value: 10
periodSeconds: 60
- type: Pods
value: 4
periodSeconds: 60
selectPolicy: Max