I am new to kubernetes and HPA. I did not find both the CPU and memory target thresholds configuration together in the official docs Is it possible to do something like below?
My current sample hpa spec:-
hpaSpec:
maxReplicas: 10
minReplicas: 5
targetCPUUtilizationPercentage: 50
targetMemoryUtilizationPercentage: 80
Does this mean that the pods will scale up in both the following conditions:-
1. CPU utilization > 50% even if memory utilization <80%
2. memory utilization > 80% even if CPU utilization <50%
OR
1. If both CPU utilization > 50% and memory utilization >80%
Similarly, will it scale down if either CPU utilization falls below 50% or memory utilization falls below 80% or only if both threshold conditions are satisfied? (Is it an OR or AND condition on the thresholds?)
Is there a better way do this i.e. use averageUtilization
instead? TIA