apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: api-produtos
  namespace: entrega
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: api-produtos
  minReplicas: 2
  maxReplicas: 5
  metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          averageUtilization: 50
          type: Utilization