Hi, all
When studying Kubernetes HPA, I'm a little confused at targetAverageUtilization, for CPU metrics, if I understand the document correctly,
targetAverageUtilization = (heapstervalue) / (pod request cpu) * 100%
Here request cpu is defined in yaml:
resources:
requests:
cpu: 100m
memory: 100Mi
So, if cpu metrics value from heapster is 200m, then targetAverageUtilization for cpu is 200%.
The question is, requested cpu value is the minimal resource usage I GUESS for pod scheduling, I don't know what's the actual cpu usage, maybe is much higher than 100m here, if I define the HPA threshold to 50%, but the physical host have enough sources available, this will cause unexpected autoscaling.
So I'm wondering why Kubernetes not use limit value as the base or host's total resource as the base? If above is the correct theory what Kubernetes is doing, how can I define a proper request value?
Thanks.