I am using the following simplest HPA with keycloak 17 statefulset
Requests and limits are as follows
This HorizontalPodAutoscaler will maintain an average CPU utilization of 50% across all Pods.
I want to know which additional metrics/custom metrics should we consider while creating HPA? Perhaps we should have a standard HPA template documented somewhere e.g. at keycloak-quickstarts/kubernetes-examples at latest · keycloak/keycloak-quickstarts · GitHub
A relatively better HPA is from helm-charts/charts/keycloak at master · codecentric/helm-charts · GitHub
# The minimum and maximum number of replicas for the Keycloak StatefulSet
# The metrics to use for scaling
- type: Resource
# The scaling policy to use. This will scale up quickly but only scale down a single Pod per 5 minutes.
# This is important because caches are usually only replicated to 2 Pods and if one of those Pods is terminated this will give the cluster time to recover.
- type: Pods