One replic on [Leader] | any replics on [worker]

Hello, some people know how I get this scenario?
My cluster:
1 leader
1 worker

I believe:
[Service X 5/5 replics]
Leader: 1/5
Worker: 4/5

Can you help me?

I highly doubt that you can specify weights to deployment constraints.

Only a dirty workaround commes to mind:
Within a single compose.yml
– use a service with a single replica with a deployment constraint for master nodes
– use another service with multiple replica with a deployment constraint for worker nodes
– make sure both services use the same network alias.
– Since you run two distinct services, a publised ingress port will work for either one of them, but not both. You will need to add a loadbalancer container (nginx?) in the same docker network and use the shared network alias of the services for the backend address.

Does that make sense?