1
0
Fork 0
home-stack-kustomize/kustomize/bases/imaginary/imaginary-autoscaler.yaml

30 lines
561 B
YAML

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: server-autoscaler
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: server
minReplicas: 2
maxReplicas: 4
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 60
behavior:
scaleUp:
policies:
- type: Pods
value: 100
periodSeconds: 10
scaleDown:
policies:
- type: Pods
value: 1
periodSeconds: 300