aibilly_backend_code/k8s/hpa.yaml
2026-03-10 16:44:04 +05:30

46 lines
908 B
YAML

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: test_project-hpa
namespace: test_project
labels:
app: test_project
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: test_project-deployment
minReplicas: 3
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 80
behavior:
scaleDown:
stabilizationWindowSeconds: 300
policies:
- type: Percent
value: 50
periodSeconds: 60
scaleUp:
stabilizationWindowSeconds: 0
policies:
- type: Percent
value: 100
periodSeconds: 15
- type: Pods
value: 2
periodSeconds: 15
selectPolicy: Max