当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Git SSH bad permissions
- How does varhart xgantt represent working days on a calendar
- Exclusive interview of guests at | 2020 PostgreSQL Asia Conference: Wang Tao
- 2020-08-19: what mechanism does TCP ensure reliability?
- Js数组-数组的用法全在这里(数组方法的重构、数组的遍历、数组的去重,数组的判断与转换)
- [learning] interface test case writing and testing concerns
- Summary of common SQL statements
- Common mathematical basic formulas of recursive and backtracking algorithms
- STM32F030C6T6兼容替换MM32SPIN05PF
- How to deploy Gantt chart quickly and correctly
猜你喜欢
关于DevOps的七大误解,99%的人都曾中过招!
win7 APPCRASH(解决方法)(转)
Detect certificate expiration script
Using JSON webtoken (JWT) to generate token in nodejs
测试攻城狮必备技能点!一文带你解读DevOps下的测试技术
python3操作Jenkins模块api
How to use Gantt chart layers and filters
ImageMagick - add watermark
Mobile pixel adaptation scheme
【涂鸦物联网足迹】涂鸦云平台全景介绍
随机推荐
Nonvolatile MRAM memory used in all levels of cache
Gantt chart grouping activities tutorial
2020年新规,微信封号怎么快速解除?
QT audio and video development 46 video transmission UDP version
Dynamsoft barcode reader v7.5!
1万辆!理想汽车召回全部缺陷车:已发生事故97起,亏损将扩大
Two dimensional code location and alarm system of Expressway
Windows 10 蓝牙管理页面'添加蓝牙或其他设备'选项点击无响应的解决方案
MRAM高速缓存的组成
Message queue - Analysis
Exclusive interview of guests at | 2020 PostgreSQL Asia Conference: Wang Tao
Getting started with varhart xgantt
Windows 10 Bluetooth management page 'add Bluetooth or other devices' option click no response solution
VARCHART XGantt如何在日历上表示工作日
Epu360: all the H5 templates you want are here, e-book, big turntable, red envelope rain, questionnaire survey
预留电池接口,内置充放电电路及电量计,迅为助力轻松搞定手持应用
DC-1 target
Application of UHF RFID medical blood management system
August 14, 2020: what are the execution engines for data tasks?
[graffiti Internet of things footprints] panoramic introduction of graffiti cloud platform