Open JiangJungle opened 2 years ago
What's wrong with having replica=1? Swarm wouldn't just increase that number.
What's wrong with having replica=1? Swarm wouldn't just increase that number.
I can only have one container, otherwise my application cluster will have problems. I must prevent the swarm service replica from being changed。
If this is really important to you, I suggest looking into solutions like https://github.com/ybrs/single-beat and handling this on the application side
@JiangJungle :
replica = 1 and max_replicas_per_node = 1
and also make sure you use stop-first
update order
If you are satisfied with the answers, please close the issue. You might also fix this application wise like it was mentioned above.
In the Swarm cluster, I can only create a container with the concept of replica, which is called service, or use docker run to start a local container.
I want to create a container in the swarm cluster. This container can't expand replicas and can be dispatched to any node in the cluster. The docker run command can only start the container locally, and the swarm service can change the number of copies at will. These are not what I want.
Please tell me what I should do, thank you!