Changing the docker network peers IP's RRS feed

  • Question

  • We recently added a NIC to each of our docker host machines.  So at the moment there are 2 nics per host.   1 of the nics is a private NIC/IP dedicated to F5 load balancing traffic and the other for general machine IP traffic.

    How can I have the swarm mode management listening on the regular machine IP and the applications listening on the F5 private NIC.

    Is that possible?

    • Edited by LanceLyons Monday, October 14, 2019 3:55 PM
    Friday, October 11, 2019 9:11 PM

All replies

  • I have tried to recreate the swarm using these commands

    making some assumptions

    HOST 1      IP 1      IP2 (private f5 ip)

    HOST 2      IP 1      IP2 (private f5 ip)

    docker swarm init --advertise-addr= --listen-addr --data-path-addr 

    then on the HOST 2

    docker swarm join -data-path-addr  --token SWMTKN-1-29j4ahhylc7mls2hvogsdwksx7kofiog62r7cwsfczztobivnf-2y6i9ukkbs97vxyv6193m62kh

    then i create a network       docker network create --driver overlay olhnetwork

    then start up 2 services.

    docker service create --network=olhnetwork --name AuthService --replicas 2 --publish 8090:80  authservice:latest

    docker service create --network=olhnetwork --name ClientPortal --replicas 2 --publish 8080:80  clientportalwconfigs:latest

    then do a     docker network inspect  olhnetwork

    and the networks defined peers are still   

            "Peers": [
                    "Name": "1e1e93f7215b",
                    "IP": ""
                    "Name": "ee7d63cae056",
                    "IP": ""

    How can I force the management to be on the addresses but have the application listening on

    Is this possible?

    Tuesday, October 15, 2019 7:59 PM