apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: podinfo
  namespace: demo
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: podinfo
  minReplicas: 2
  maxReplicas: 4
  metrics:
  - type: Resource
    resource:
      name: cpu 
      target:
        type: Utilization 
        averageValue: 0.5m
  - type: Resource
    resource:
      name: memory 
      target:
        type: Utilization 
        averageValue: 13Mi
