Sha*_*gun 4 docker docker-swarm docker-machine
是否有任何限制 swarm 为每个工人创建例如 20 个容器。因此,为了更好的 QoS(服务质量),一名工作人员不会拥有超过 20 个容器,这也将防止过度使用主机资源?
谢谢
For docker-ce 19.03+, you can simply create/update your service with the --replicas-max-per-node
option:
# create service with replicas-max-per-node=10
docker service create --replicas=100 --replicas-max-per-node=10 --name your_service_name your_image_name
# update service with replicas-max-per-node=20
docker service update --replicas-max-per-node=20 your_service_name
Run Code Online (Sandbox Code Playgroud)
- Add 3.8 compose version
Limit service scale to the size specified by the field deploy.placement.max_replicas_per_node
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
5492 次 |
最近记录: |