How to schedule containers with multi AZ High Availability?

I have 6 instances running on AWS with 2 instances on each availability zone, so I have 6 hosts in my rancher Dashboard, with labels:
az:us-west-2a(key:value) - 2 instances
az:us-west-ab(key:value) - 2 instances
az:us-west-2c(key:value) - 2 instances

My use case is, I am running a service with 3 containers and I want to schedule it in such a way that at least one container should run on each availability zone i.e.

one container should run on one of the instance having label az:us-west-2a(key:value)
one container should run on one of the instance having label az:us-west-2b(key:value)
one container should run on one of the instance having label az:us-west-2c(key:value)

2 Likes

At this time, I don’t believe this is possible.

You can make sure that not all 3 containers are scheduled onto the same host, but with our existing scheduling rules, I can’t think of a way to distribute between the 3 zones.

You could create an issue for Github for this use case.

Thanks for your reply Denise, Here is the github issue link for reference: https://github.com/rancher/os/issues/913

This is unfortunate. Are there any manual workarounds?

this is a deadly needed feature in production AWS environment, would like to see it implemented as soon as possible.

how can you do that? (make sure they’re not scheduled on the same host?)