官术网_书友最值得收藏!

Docker user-defined networks

In order to address the cross-machine communication issue and allow greater flexibility, Docker also supports user-defined networks via network plugins. These networks exist independent of the containers themselves. In this way, containers can join the same existing networks. Through the new plugin architecture, various drivers can be provided for different network use cases such as the following:

  • Swarm: In a clustered situation with Swarm, the default behavior is an overlay network, which allows you to connect multiple Docker daemons running on multiple machines. In order to coordinate across multiple hosts, all containers and daemons must all agree on the available networks and their topologies. Overlay networking introduces a significant amount of complexity with dynamic port mapping that Kubernetes avoids.
You can read more about overlay networks here:  https://docs.docker.com/network/overlay/.
  • Macvlan: Docker also provides macvlan addressing, which is most similar to the networking model that Kubernetes provides, as it assigns each Docker container a MAC address that makes it appear as a physical device on your network. Macvlan offers a more efficient network virtualization and isolation as it bypasses the Linux bridge. It is important to note that as of this book's publishing, Macvlan isn't supported in most cloud providers.

As a result of these options, Docker must manage complex port allocation on a per-machine basis for each host IP, and that information must be maintained and propagated to all other machines in the cluster. Docker users a gossip protocol to manage the forwarding and proxying of ports to other containers.

主站蜘蛛池模板: 齐齐哈尔市| 漳州市| 东辽县| 莱西市| 漳平市| 大姚县| 万载县| 江孜县| 晋城| 高安市| 旺苍县| 同心县| 青阳县| 邵东县| 汉阴县| 新绛县| 花垣县| 陈巴尔虎旗| 蓝田县| 大洼县| 巢湖市| 安阳市| 娄底市| 吉安县| 蒙山县| 鹤峰县| 深圳市| 讷河市| 开鲁县| 隆子县| 商水县| 霸州市| 浦江县| 板桥市| 邵阳县| 五台县| 石棉县| 宜春市| 凉山| 琼海市| 交城县|