Skip to content

Example: HorizontalPodAutoscaler

ebelo edited this page Apr 20, 2026 · 1 revision

Create a Deployment with a HorizontalPodAutoscaler.

services:
  deployment1:
    enabled: true
    containers:
      container1:
        image:
          repository: camptocamp/image
          tag: latest
    hpa:
      enabled: true
      minReplicas: 2
      maxReplicas: 5
      metrics:
        - type: Resource
          resource:
            name: cpu
            target:
              type: Utilization
              averageUtilization: 50
      behavior:
        scaleUp:
          policies:
            - type: Percent
              value: 100
              periodSeconds: 60
        scaleDown:
          stabilizationWindowSeconds: 300
          policies:
            - type: Percent
              value: 10
              periodSeconds: 60

The hpa.behavior block is forwarded to the generated HorizontalPodAutoscaler.spec.behavior, so Kubernetes options like scaleUp and scaleDown can be configured directly.

Clone this wiki locally