I want to deploy my web API in docker swarm. The steps which i followed as:-
-
Initialize the Docker swarm
-
Create overlay Network
3)Join the other vm with manager node
- Create service using below syntax:
docker service create --name=testapi --publish 7243:80 --network=dockerswarm --replicas=5 testapi
As a result of the above syntax, i can see 5 containers created. 2 in manager node and 3 in worker node, but while testing the load balancing only manager nodes container is getting called. none of the worker nodes is working.
Am i missing something? Please help