Goal: Have a script-like which will call Docker API to create automatically a new service to a new client host and then, update iptables forwarding rules on all swarm nodes accordingly to the new service port.
Question: What is the best/robust approach to dynamically uptable iptables rules across multiple swarm nodes in order to easily add new client apps to new client Hosts.
Flow of the scenario:
Scenario Image:
Scenario (example):
Docker Swarm Hosts
Docker Swarm Services
Client Hosts
Network LoadBalancer
IPTables Rules on Swarm Nodes
OK some quick items that may help you decide on a solution. This is as of 17.12 release: