uek-109-LBb/deployment/hpa.yaml

39 lines
713 B
YAML
Raw Normal View History

2024-07-02 14:09:47 +02:00
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: counter-backend
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: counter-backend
minReplicas: 2
maxReplicas: 8
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: counter-frontend
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: counter-frontend
minReplicas: 2
maxReplicas: 12
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50