Last active
January 23, 2024 06:19
-
-
Save initcron/fe34915fd222583e3170f4f88fc1054f to your computer and use it in GitHub Desktop.
HPA v2 Spec for Vote App
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: autoscaling/v2 | |
kind: HorizontalPodAutoscaler | |
metadata: | |
name: vote | |
spec: | |
minReplicas: 2 | |
maxReplicas: 10 | |
metrics: | |
- type: ContainerResource | |
containerResource: | |
name: cpu | |
container: app | |
target: | |
type: Utilization | |
averageUtilization: 50 | |
scaleTargetRef: | |
apiVersion: apps/v1 | |
kind: ReplicaSet | |
name: vote | |
behavior: | |
scaleDown: | |
policies: | |
- type: Pods | |
value: 2 | |
periodSeconds: 120 | |
- type: Percent | |
value: 25 | |
periodSeconds: 120 | |
stabilizationWindowSeconds: 300 | |
scaleUp: | |
stabilizationWindowSeconds: 0 | |
policies: | |
- type: Percent | |
value: 100 | |
periodSeconds: 15 | |
- type: Pods | |
value: 2 | |
periodSeconds: 15 | |
selectPolicy: Max |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment