Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

README.md

Playing on overlay networks

Start with a swarm cluster with at least one machine in.

Then create a new network with the overlay driver.

$ docker network create...

Next start a debug container

$ docker service create --network debugnetwork --name debug --mode global alpine sleep 1000000000

Create some stuff to explore

Create a new swarm service on the debugnetwork network, and give it the name _testme.

Scale the service up to 5 replicas using the docker service scale command.

Entering the debug container

Once all our container is started. You should enter the debug container using docker exec -it

Installing our debugging tools

Install a few tools in the debug container

$ apk add --update curl apache2-utils drill

Now lets look at the virtual IP and the list of actual IP addresses

  • First, let's check what the dns resolves to
  • Use drill toresolve the dns:
$ drill testme

This returns the VIP. Now try the same with the special tasks.testme dns.

Trying out endpoint modes

Create a new testMeDnsrr service on the correct network with the --endpoint-mode DNSRR parameter, and scale it to 5 instances.

Use the same drill commands on this new service from the debug container.

This should list all IP addresses for both types of dns lookups.