Skip to content

gateway-hpa.yaml

Download gateway-hpa.yaml as it is.

deploy/kubernetes/gateway-hpa.yaml
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: houradvantage-gateway
labels:
app.kubernetes.io/name: houradvantage
app.kubernetes.io/component: gateway
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: houradvantage-gateway
minReplicas: 2
# Every replica holds a database pool: raise max_connections with this
# (see the Kubernetes guide).
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
behavior:
# Scaling down moves clocks between pods; do it slowly.
scaleDown:
stabilizationWindowSeconds: 600
policies:
- type: Pods
value: 1
periodSeconds: 120