apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: random-generator
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: random-generator
  maxReplicas: 20
  metrics:
  - resource:
      name: cpu
      target:
        averageUtilization: 50
        type: Utilization
    type: Resource
  minReplicas: 1
