apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: hpa-test
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: hpa-test
  maxReplicas: 5
  minReplicas: 1
  metrics:
    - type: Resource
      resource:
        name: memory
        target:
          averageUtilization: 70
          type: Utilization