https://rancher.com/ logo
Title
l

little-dress-13576

03/24/2023, 12:25 AM
How does Harvester/Kubevirt load balancing VMs (DRS) around multiple nodes in the same cluster? With 3-node (very powerful physical hosts) empty Harvester cluster, I deployed 3 small VMs, and it seems it deployed these 3 VMs on the same physical host. Is this just randomness? Or is it because it would prefer packing up one node first, before deploying new VMs on other nodes in the cluster?
r

refined-analyst-8898

03/24/2023, 12:48 AM
I too naively expected your 3 small VMs to fan out evenly. If it were me, I'd explore pod anti-affinity, if it's important to spread them out. I also wonder if you'd get a different result with a deployment having 3 replicas, because in that scenario Kubernetes ostensibly "knows" they're instances of the same application.
l

little-dress-13576

03/24/2023, 10:53 PM
There’s no UI for affinity setup. It seems harvester product is very raw yet..
r

refined-analyst-8898

03/24/2023, 11:00 PM
That would be on the pod that represents the VM.