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
1. Remove MySQL a. sudo apt-get autoremove --purg...
TypeScript Bundling webpack integration Usually, ...
1. js will not protect hasOwnProperty from being ...
Let's start with the body: When viewing a web ...
Table of contents Ideas Host Configuration Modify...
Mysql is a mainstream open source relational data...
Failure Scenario When calling JDBC to insert emoj...
Table of contents 1. Basic storage of files and d...
Table of contents 1. Directive custom directive 2...
What are :is and :where? :is() and :where() are p...
Table of contents 01 Common Faults 1 02 Common Fa...
This article example shares the specific code of ...
This article introduces how to configure Nginx to...
Vue stores storage with Boolean values I encounte...
Table of contents 1. Variable Overview 1.1 Storag...