I have a docker swarm with 1 master node and 7 worker nodes across 3 machines all running tomcat containers.
I wish to deploy all my containers to only strictly 2 worker nodes.
How will i setup the affinity rule for such a deployment?
Can you please help me with the detailed steps on how to achieve this?