apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: nginx-hpa
namespace: kube-system
spec:
maxReplicas: 4
metrics:
- pods:
metricName: http_requests
targetAverageValue: '10'
type: Pods
minReplicas: 2
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: nginx-ingress-controller