apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
namespace: apm
name: api-autoscaler
labels:
app: api-autoscaler
spec:
scaleTargetRef:
apiVersion: apps/v1beta2
kind: Deployment
name: api-app
minReplicas: 2
maxReplicas: 5
metrics:
- type: Resource
resource:
name: cpu
targetAverageUtilization: 80
- type: Resource
resource:
name: memory
targetAverageValue: 1024Mi