Schedule for HA and Scale (ensure both)

when setting up the service schedule it would be great if we can inform cattle to consider HA but not impact scale.

ie

I have 2 hosts, with a label app=1

I have a Service (stack1/service1) add the following schedule rules:

  • the host must have a host label of app = 1
  • the host should not have a service with a name stack1/service1

and scale = 3

depending on the hosts, Cattle may put all 3 containers on the same host.

is there a way to say but ensure at least 1 container is on another host. so 2 go onto host A and and 1 container goes to host B. and cattle will ensure that there will also ways be at least 1 container on another host

Based on your setup, cattle will not put all 3 containers on the same host.

The scheduler in cattle would first look for all hosts that qualify all the rules before starting to remove the “should/should not rules”

Therefore, you should have 2 contaienrs on 1 host and 1 container on another host.