Skip to main content

Horizontal Pod Autoscaling (HPA)

In Kubernetes or OpenShift you can set the Horizontal Autoscaling for your application or microservice.(The hpa object)
This page explains you how.


1. In your manifest repository's main branch, you will find the values.yaml file, it showld be in the following folder structure [environment]/[project]/[application]

2. In the values.yaml file, search for the Additional Customizations section, you will find it like this:


## Additional Customizations #################################################

3. Bellow the section title, add the following configuration and change the values as you need:

  # - Horizontal Pod Autoscaling (HPA)
autoscaling:
# Enable Autoscaling: true or false
enabled: false
# Defines additional labels
additionalLabels:
#key: value
# Defines annotations in key value pair
annotations:
#key: value
# Sets the minimum number of replicas
minReplicas: 1
# Sets the maximum number of replicas
maxReplicas: 10
# Metrics used for hpa
metrics:
#- type: Resource
# resource:
# name: memory
# target:
# type: Utilization
# averageUtilization: 60
#- type: Resource
# resource:
# name: cpu
# target:
# type: Utilization
# averageUtilization: 60
#####

4. Commit and enjoy! ✨