This is a simple project in which we are combining load balancing with docker swarm.
The cluster look like this :
We start by enabling swarm mode, and defining the leader
We then, get the token for joining workers :
We check the nodes status :
We create the service with 3 replicas
we start by initializing a new swar mode :
We configure nginx :
We create service :
You can test that the load balancer is working, by changing the /usr/share/nginx/index.html
in each container node.
Ayoub Ed-dafali