Overlay networks, service discovery and ingress
Worked example
This is an offline lesson. Data are fictional and Docker commands are unexecuted. Any optional execution requires an authorized disposable VM, a verified context, synthetic data, restricted access and no external transmission. Do not collect secrets or private output. Use only the fictional worksheet for this exercise. Before a separately authorized read-only server query, verify the effective endpoint including environment overrides, project or cluster identity, and access scope. Never deploy the fragments, use real credentials or transmit private inspection output.
Offline topology (no ports opened):node A: web task; node B: api task; node C: no web taskedge overlay: web + api; data overlay: api + dbweb published port proposal: 8443 -> target 8080, mode ingressrequest to node C:8443 may be routed to web task on AAlternative mode host: port exposed on nodes running the taskNo public listener or firewall change is authorized.With the ingress mesh a published port can be reached through swarm nodes even when they do not host the destination task, subject to network and firewall configuration. Host publishing bypasses that routing mesh; fixed published ports may restrict task placement when several tasks need the same port on one node. For internal communication, Swarm commonly uses a virtual IP for a service, while DNS round-robin is another endpoint mode with different load-balancing responsibilities. Do not assume every combination of endpoint and publishing mode is supported. Node control traffic uses mutual TLS, but application overlay data is not automatically encrypted merely because the cluster has TLS. Review overlay encryption support and application TLS separately. Keep management and overlay transport inside a reviewed private network and publish only intended services. The ingress proposal extends the exposure review to every swarm node, including managers and nodes with no web task, subject to routing and firewalls. Host publishing bypasses that mesh; fixed published ports constrain co-location. Do not equate control-plane TLS with application-data encryption.
Common mistake
Do not assume a node without a web task cannot accept ingress traffic for web. Review exposure across all cluster nodes.
Manual practice
Draw the example networks and identify every node that could accept the proposed ingress port. Explain how host mode changes the exposure review and why a database service needs no public port for internal API access.
Worksheet: lab-fixtures/docker-swarm-orchestration/04-overlay-ingress/scenario.txt.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Overlay networks, service discovery and ingress — Knowledge check
Interpret cluster orchestration evidence and make a safe operational decision.
Can ingress route a request received by a node without a matching task?
Which publishing mode bypasses the ingress routing mesh?
Does node mutual TLS automatically encrypt all overlay application traffic?