Kubernetes allows you to create external IP's for services. In Docker Swarm is it possible to set an endpoint for each service separate from a node IP?
For instance:
node1 192.168.1.22
node2. 192.168.1.23
My service would be:
myweb1 192.168.1.101. 80
So I would have tasks running on each node but the service would be accessible at http://192.168.1.101.
First, create overlay network on a manager node using the docker network create command with the --driver overlay flag. After you create an overlay network in swarm mode, all manager nodes have access to the network. The swarm extends my-network to each node running the service.
By default Docker Swarm uses a default address pool 10.0. 0.0/8 for global scope (overlay) networks.
Mirantis announced that its managed Docker service will gradually switch from Swarm to Kubernetes as its main orchestrator.
You can't. A service in Swarm mode can only be assigned to an Overlay network so the service can't be exposed to the hosts' network without some bridging (ie: using the --publish
option).
Note that internally (inside the Overlay network), Swarm allocates an ip for each service, irrespective of on which node(s) it runs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With