I wondered what would happen if I created a Kubernetes cluster with unequal worker nodes. How would the HPA allocate the load?
Worker nodes 1-3 are all Ubuntu 20 nodes with 4 vCPUs and and 4 GB of memory. Worker node 4 has Ubuntu 20 with 6 vCPUs and 8 GB of memory Worker node 5 has Ubuntu 20 with 2 vCPUs and 4 GB of memory
As you can see from the below information, the HPA evenly spreads the load between equal nodes, more load on the ‘stronger’ node and less on the ‘weaker’ node.
1
2
3
4
5
6
7
8
9
============================================================================================
Number of pods running on each node
--------------------------------------------------------------------------------------------
master1 0
worker1 19 ===================
worker2 19 ===================
worker3 19 ===================
worker4 31 ===============================
worker5 9 =========