In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to use flannel in Docker. The quality of the article is high, so Xiaobian shares it with you as a reference. I hope you have a certain understanding of relevant knowledge after reading this article.
Use flannel in Docker.
Configuring Docker Connection Flannel
Edit the Docker configuration file/etc/systemd/system/docker.service for host1 to set--bip and--mtu.
The values of these two parameters must match FLANNEL_SUBNET and FLANNEL_MTU in/run/flannel/subnet.env.
Restart Docker daemon.
systemctl daemon-reload
systemctl restart docker.service
Docker configures 10.2.40.1 to Linux bridge docker0 and adds a route to 10.2.40.0/24
Host2 is configured similarly:
--bip=10.2.17.1/24
--mtu=1450
The current environment network topology is visible: Flannel does not create a new docker network, but uses the default bridge network directly. Containers on the same host are connected via docker0, and cross-host traffic is forwarded via flannel.1.
Connect containers to the flannel network
Run container bbox1 in host1:
docker run -itd --name bbox1 busybox
Run container bbox2 in host2:
docker run -itd --name bbox2 busybox
The IP addresses for bbox1 and bbox2 are 10.2.40.2 and 10.2.17.2, respectively.
About how to use flannel in Docker to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.