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

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.

主站蜘蛛池模板: 视频| 松滋市| 静安区| 城市| 武定县| 库尔勒市| 灵丘县| 乌鲁木齐市| 辛集市| 华阴市| 鸡西市| 张北县| 宁明县| 买车| 富锦市| 长岛县| 永靖县| 兴业县| 通榆县| 绥德县| 桐乡市| 聂荣县| 大丰市| 双柏县| 合水县| 喀喇| 固阳县| 凤阳县| 宁陵县| 普格县| 闸北区| 阳泉市| 涿州市| 乡宁县| 龙胜| 新竹市| 阳朔县| 高州市| 上高县| 萍乡市| 新平|