swarm three virtual machines 132,133,134 1. Initialize a cluster and add yourself to the cluster # Initialize the master node docker swarm init --advertise-addr 192.168.220.132 # 133,134 join worker Execute docker swarm join-token worker on 132 # Add worker (manager-- master node management node) # Execute docker swarm join --token SWMTKN-1-49blzc9unsa1e8vcb4sonqx2q2rq02588jqjbhfzykowgtaoy1-57s37b21k0h39j0ywf6vd6la1 on the corresponding machine 192.168.220.132:2377 2. View the node docker node ls 3. The master node creates service nginx replicas 1 (one service) docker service create --replicas 1 --name manageNg -p 80:80 nginx All three IPs can be accessed normally, but there is only one container instance. View services: docker service ls docker service ls Dynamic scaling: docker service scale manageNg=5 docker service scale manageNg=5 5. View the instance; docker service ps manageNg This is the end of this article about the simple use of Docker swarm. For more information about the use of Docker swarm, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: How to get/calculate the offset of a page element using JavaScript
>>: Ten important questions for learning the basics of Javascript
This reading note mainly records the operations r...
1. Online Text Generator BlindTextGenerator: For ...
When I was printing for a client recently, he aske...
React Native is a cross-platform mobile applicati...
Chinese characters cannot be input in lower versio...
The complete code is as follows : HTML code: Copy ...
Preface: I reinstalled win10 and organized the fi...
The docker repository itself is very slow, but th...
.y { background: url(//img.jbzj.com/images/o_y.pn...
introduce If you are using an OSS storage service...
Table of contents 1. Introduction 2. filter() 3. ...
Table of contents 1. Union Type 2. Crossover Type...
<br />Original URL: http://www.lxdong.com/po...
Create a new server.js yarn init -y yarn add expr...
Basic preparation For this implementation, we nee...