uek-109-LBb/deployment/hpa.yaml
2024-07-02 12:09:47 +00:00

39 lines
713 B
YAML

---
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