apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: spring-api
spec:
minReplicas: 1
maxReplicas: 5
metrics:
- resource:
name: cpu
target:
averageUtilization: 20
type: Utilization
type: Resource
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: spring-deployment #This should be the relevant deployment name
supunuom / k8s-horizontalpodautoscaler Goto Github PK
View Code? Open in Web Editor NEWHorizontalPodAutoScaler Demo