image.png

    1. apiVersion: autoscaling/v2beta1
    2. kind: HorizontalPodAutoscaler
    3. metadata:
    4. name: nginx-hpa
    5. namespace: kube-system
    6. spec:
    7. maxReplicas: 4
    8. metrics:
    9. - pods:
    10. metricName: http_requests
    11. targetAverageValue: '10'
    12. type: Pods
    13. minReplicas: 2
    14. scaleTargetRef:
    15. apiVersion: apps/v1
    16. kind: Deployment
    17. name: nginx-ingress-controller

    image.png