当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Jenkins installation and deployment process
- QT audio and video development 46 video transmission UDP version
- Characteristics of magnetic memory chip STT-MRAM
- The Interpreter pattern of behavior pattern
- Configuration of AP hotspot on xunwei-imx6ull development board
- What grammar is it? ]
- Interviewer: how about shardingsphere
- Stm32f030c6t6 compatible to replace mm32spin05pf
- [doodling the footprints of Internet of things] Introduction to Internet of things
- JS string - string string object method
猜你喜欢
Empty test suite appears in JUnit test
如何创建交互式内核密度图表
8.Swarm创建维护和水平扩展Service
python3操作Jenkins模块api
NAND FLASH的接口控制设计
The first choice for lightweight GPU applications is the NVIDIA vgpu instance launched by Jingdong Zhilian cloud
2020-08-20: the difference between go and python?
Mobile pixel adaptation scheme
September 3, 2020: naked writing algorithm: loop matrix traversal.
The essence of transaction and the principle of deadlock
随机推荐
How does varhart xgantt represent working days on a calendar
Es create a new index database and copy the old index library, practice pro test effective!
甘特图对活动进行分组教程
ado.net and asp.net The relationship between
The memorandum model of behavior model
The first choice for lightweight GPU applications is the NVIDIA vgpu instance launched by Jingdong Zhilian cloud
confd
The Interpreter pattern of behavior pattern
image operating system windows cannot be used on this platform
STM32F030K6T6兼容替换灵动MM32F031K6T6
[learning] interface test case writing and testing concerns
FreeSWITCH视频会议“标准”解决方案
Qt音视频开发46-视频传输UDP版
What grammar is it? ]
LEADTOOLS如何检测,读取和写入条形码
Reserved battery interface, built-in charge and discharge circuit and electricity meter, quickly help easily handle hand-held applications
Win7 AppCrash (solution)
Jenkins installation and deployment process
小熊派开发板实践:智慧路灯沙箱实验之真实设备接入
Mongo user rights login instruction