Can I bypass the routing mesh?

0 votes
Is it possible to bypass the routing mesh? If yes, what's the command to do so?
Jul 8 in Docker by Sam
• 1,520 points
18 views

1 answer to this question.

0 votes

Yes. You can bypass the routing mesh, so that when you access the bound port on a given node, you are always accessing the instance of the service running on that node. This is referred to as host mode.

To bypass the routing mesh, you must use the long --publish service and set mode to host. If you omit the mode key or set it to ingress, the routing mesh is used. 

The following command creates a global service using host mode and bypassing the routing mesh.

$ docker service create --name dns-cache \
  --publish published=53,target=53,protocol=udp,mode=host \
  --mode global \
  dns-cache
answered Jul 8 by Sirajul
• 25,180 points

Related Questions In Docker

0 votes
2 answers

How can I inspect the file system of a failed `docker build

Failed command is a build that has ...READ MORE

answered Aug 6, 2018 in Docker by Nilesh
• 6,880 points
75 views
+1 vote
0 answers
+1 vote
11 answers
0 votes
1 answer

How can I expose more than 1 port with Docker?

To expose just one port, this is ...READ MORE

answered Jul 25, 2018 in Docker by Kalgi
• 40,420 points
29 views
0 votes
1 answer
+5 votes
7 answers

Docker swarm vs kubernetes

Swarm is easy handling while kn8 is ...READ MORE

answered Aug 27, 2018 in Docker by Mahesh Ajmeria
997 views
0 votes
1 answer
0 votes
2 answers

How do I fix the “no space left on device” error in docker?

Try cleaning up: $ docker volume rm $(docker ...READ MORE

answered Aug 14 in Docker by Sirajul
• 25,180 points
1,437 views