Last active
May 5, 2024 05:17
-
-
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 # change this as per actual container name | |
target: | |
type: Utilization | |
averageUtilization: 50 | |
scaleTargetRef: | |
apiVersion: apps/v1 | |
kind: ReplicaSet # change it to Deployment if have created a deployment already | |
name: vote | |
behavior: | |
scaleDown: | |
policies: | |
- type: Pods | |
value: 2 | |
periodSeconds: 120 | |
- type: Percent | |
value: 25 | |
periodSeconds: 120 | |
stabilizationWindowSeconds: 60 | |
scaleUp: | |
stabilizationWindowSeconds: 45 | |
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