apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: laracon2019
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: laracon2019
  minReplicas: 1
  maxReplicas: 10
  metrics:
    - type: Object
      object:
        describedObject:
          kind: ingress
          apiVersion: networking.k8s.io/v1beta1
          name: laracon2019
        target:
          type: AverageValue
          averageValue: 10 # we don't want more than 10rps per replica
        metric:
          name: requests_per_second
