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

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.

主站蜘蛛池模板: 柳州市| 桐城市| 涿鹿县| 洛隆县| 沈阳市| 镶黄旗| 岳普湖县| 延长县| 南靖县| 石狮市| 丰宁| 高雄县| 海南省| 象州县| 土默特左旗| 西安市| 翁牛特旗| 罗田县| 洱源县| 黎平县| 水富县| 马鞍山市| 宜川县| 确山县| 定州市| 金沙县| 泉州市| 全州县| 镇雄县| 新绛县| 乾安县| 湟中县| 威海市| 韩城市| 通城县| 含山县| 舟山市| 启东市| 铁岭县| 任丘市| 澄城县|