Building and Testing Docker Overlay Networks
Let’s learn to implement a Docker overlay network in swarm mode.
We'll cover the following...
We’ll need at least two Docker nodes configured in a swarm to follow along. The examples in the course show the two nodes on different networks connected by a router, but yours can be on the same network. You can follow along with two Multipass VMs on the same laptop or computer, but any Docker configuration will work as long as the nodes can communicate. We don’t recommend using Docker Desktop as you only get a single node and won’t get the full experience.
The figure below shows the initial lab configuration. Remember, your nodes can be on the same network, this will just mean your underlay network is simpler. We’ll explain underlay networks later.
Build a swarm
If you’re following along, you’ll need a swarm because overlay networks leverage the swarm’s key-value store and other security features.
This section builds a two-node swarm with two Docker nodes called ...