当前位置:网站首页>8. Swarm creates maintenance and horizontal extension service
8. Swarm creates maintenance and horizontal extension service
2020-11-06 22:33:00 【Taizhu-yj】
establish service
docker service create --name demo busybox sh -c "while true;do sleep 3600;done"
see service, There is only one copy replicas 1/1
docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
qbpicc7rvm49 demo replicated 1/1 busybox:latest
see service Details
docker service ps demo
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
nlgymox7pt59 demo.1 busybox:latest localhost.localdomain Running Running about a minute ago
Set up service Replications for 5
docker service scale demo=5
Look again service, Number of copies replicas 5/5
docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
qbpicc7rvm49 demo replicated 5/5 busybox:latest
It turns on 5 individual service copy , Distribution in 3 individual worker node On
docker service ps demo
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
nlgymox7pt59 demo.1 busybox:latest localhost.localdomain Running Running 6 minutes ago
wjnahehppsvu demo.2 busybox:latest localhost.localdomain Running Running 2 minutes ago
ogojxvke7t9b demo.3 busybox:latest localhost.localdomain Running Running 3 minutes ago
dweehxcozoku demo.4 busybox:latest localhost.localdomain Running Running 2 minutes ago
1ix2fdj39m03 demo.5 busybox:latest localhost.localdomain Running Running 2 minutes ago
Let's go to one of them worker node Delete one from the service copy
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a8661d168e78 busybox:latest "sh -c 'while true;d…" 4 minutes ago Up 4 minutes demo.3.ogojxvke7t9bza62haisw3as2
2f800599e183 busybox:latest "sh -c 'while true;d…" 8 minutes ago Up 8 minutes demo.1.nlgymox7pt59vrdj7lfjk8e4b
docker rm -f 2f800599e183
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a8661d168e78 busybox:latest "sh -c 'while true;d…" 38 minutes ago Up 38 minutes demo.3.ogojxvke7t9bza62haisw3as2
And then back to swarm manager Node , see service The number of copies becomes 4 individual , But after a short time , Back to 5 individual
docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
qbpicc7rvm49 demo replicated 5/5 busybox:latest
Check it again demo Copy details ,demo.1 It was deleted , But in swarm manager Under the management of , Some workder node Another one has been opened service Copy of , Guarantee service The number of copies of is valid .
docker service ps demo
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
z5vhrcrec1d4 demo.1 busybox:latest localhost.localdomain Running Running 6 minutes ago
nlgymox7pt59 \_ demo.1 busybox:latest localhost.localdomain Shutdown Failed 6 minutes ago "task: non-zero exit (137)"
wjnahehppsvu demo.2 busybox:latest localhost.localdomain Running Running 44 minutes ago
ogojxvke7t9b demo.3 busybox:latest localhost.localdomain Running Running 44 minutes ago
dweehxcozoku demo.4 busybox:latest localhost.localdomain Running Running 44 minutes ago
1ix2fdj39m03 demo.5 busybox:latest localhost.localdomain Running Running 44 minutes ago
We want to delete service, Need to be in swarm manager Node
docker service rm demo
demo
docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
版权声明
本文为[Taizhu-yj]所创,转载请带上原文链接,感谢
边栏推荐
- Common syntax corresponding table of mongodb and SQL
- 细数软件工程----各阶段必不可少的那些图
- LEADTOOLS如何检测,读取和写入条形码
- The Interpreter pattern of behavior pattern
- 2020-08-19: what mechanism does TCP ensure reliability?
- NAND FLASH的接口控制设计
- 南京标识标牌设计制作,导视VI系统设计
- How to manage the authority of database account?
- Qt音视频开发46-视频传输UDP版
- WebAPI接口设计:SwaggerUI文档 / 统一响应格式 / 统一异常处理 / 统一权限验证
猜你喜欢

List to map (split the list according to the key, and the value of the same key is a list)

Count the number of project code lines

Web API interface design: swaggerui document / unified response format / unified exception handling / unified authority verification

Stm32f030k6t6 compatible replacement smart mm32f031k6t6

汽车维修app开发的好处与功能

2020-08-14:数据任务的执行引擎用的哪些?

迅为iMX6开发板-设备树内核-menuconfig的使用

WebAPI接口设计:SwaggerUI文档 / 统一响应格式 / 统一异常处理 / 统一权限验证

August 14, 2020: what are the execution engines for data tasks?

7.Swarm搭建集群
随机推荐
Nanjing logo design and production, guide VI system design
VARCHART XGantt入门教程
Exclusive interview of guests at | 2020 PostgreSQL Asia Conference: Wang Tao
RFID fixed assets management system for fire equipment
QT audio and video development 46 video transmission UDP version
大佬们如何在nginx镜像里面增加模块?
打工人好物——磨炼钢铁意志就要这样高效的电脑
2020 database technology conference helps technology upgrade
STM32F030F4P6兼容灵动微MM32F031F4P6
20 XR projects roadshows, nearly 20 capital institutions attended! We sincerely invite you to attend the 2020 qcomm XR eco Partner Conference
STM32F030C6T6兼容替换MM32SPIN05PF
Epu360: all the H5 templates you want are here, e-book, big turntable, red envelope rain, questionnaire survey
Es create a new index database and copy the old index library, practice pro test effective!
上海巨微专用蓝牙广播芯片
JS string - string string object method
image operating system windows cannot be used on this platform
Mobile pixel adaptation scheme
2020-08-19: what mechanism does TCP ensure reliability?
confd
消防器材RFID固定资产管理系统