I am trying out a simple service discovery scenario using different docker stacks.
Let's assume I am having 2 stacks. For simplicity purpose,I am naming them as stackA and stackB.
StackA has a service called 'serviceA' and StackB has a service called 'serviceB'.
ServiceA and serviceB are having a simple RestApplication.
Now I want to call serviceB from serviceA. I understand the concept of docker service discovery and followed the docker official document but unable to call serviceB. discovering-services-or-containers-on-another-stack
As per official doc, I am using serviceB.StackB , but couldn't do.
Unable to understand the reason.Few points:
1.each stack creates its own network. Is it happening because both stacks are not in same network?
2. What if I need them in the different network only, how do I call different services