Horizontal Pod Autoscaler

This generates a Horizontal Pod Autoscaler object.

Property Description
Resource Type horizontal-pod-autoscaler
Account Type None



Name Type Description
annotations map Annotations to add to the manifest.
labels map Labels to add to the manifest.
maxReplicas integer The maximum number of replicas to scale to. (Must be > minReplicas.)
minReplicas integer The minimum number of replicas to scale to. (Must be > 0.)
targetCPUUtilizationPercentage integer The percentage of the CPU resource limit to attempt to scale to. (Must be between 0 and 100.)




The Driver will override any resource inputs provided if the Driver inputs are more conservativeFor example, the final maxReplicas value will be min(resource_inputs.maxReplicas, driver_inputs.maxReplicas). If the values are omitted, the resource inputs are used.


To create a resource definition that adds a Horizontal Pod Autoscaler to workloads that caps the maxReplicas at 2:

curl https://api.humanitec.io/orgs/${HUMANITEC_ORG}/resources/defs \
  -X POST \
  -H "Authorization: Bearer ${HUMANITEC_TOKEN}" \
  -H "Content-Type: application/json" \
  --data-binary '
  "id": "hpa",
  "name": "Horizontal Pod Autoscaler",
  "type": "horizontal-pod-autoscaler",
  "criteria": [
      "env_type": "development"
  "driver_type": "humanitec/horizontal-pod-autoscaler",
  "driver_inputs": {
    "values": {
      "maxReplicas": 2