apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: {name: proxy-gateway, namespace: proxy-pool} spec: scaleTargetRef: {apiVersion: apps/v1, kind: Deployment, name: proxy-gateway} minReplicas: 6 maxReplicas: 60 behavior: scaleUp: stabilizationWindowSeconds: 0 policies: - {type: Percent, value: 100, periodSeconds: 30} - {type: Pods, value: 8, periodSeconds: 30} selectPolicy: Max scaleDown: stabilizationWindowSeconds: 600 policies: [{type: Percent, value: 10, periodSeconds: 60}] metrics: - type: Resource resource: name: cpu target: {type: Utilization, averageUtilization: 55} - type: Resource resource: name: memory target: {type: Utilization, averageUtilization: 65} --- apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: {name: proxy-checker, namespace: proxy-pool} spec: scaleTargetRef: {apiVersion: apps/v1, kind: Deployment, name: proxy-checker} minReplicas: 3 maxReplicas: 30 behavior: scaleUp: stabilizationWindowSeconds: 0 policies: [{type: Percent, value: 100, periodSeconds: 30}] scaleDown: stabilizationWindowSeconds: 300 policies: [{type: Percent, value: 20, periodSeconds: 60}] metrics: - type: Resource resource: name: cpu target: {type: Utilization, averageUtilization: 60}