In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to deploy the Calico network, I believe that many inexperienced people do not know what to do. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
Calico is a pure three-layer virtual network solution. Calico assigns an IP to each container, and each host is a router, connecting containers of different host. Unlike VxLAN, Calico does not do additional encapsulation of packets, does not require NAT and port mapping, and has good scalability and performance.
Compared with other container network solutions, Calico also has one major advantage: network policy. Users can dynamically define ACL rules and control the data packets entering and leaving the container to achieve business requirements.
Description of experimental environment
Calico relies on etcd to share and exchange information between different hosts and store Calico network status. We will run etcd on host 192.168.56.101.
Each host in the Calico network needs to run the Calico component, which provides container interface management, dynamic routing, dynamic ACL, status reporting and other functions.
The experimental environment is shown in the following figure:
Start etcd first.
Start etcd
Run the following command on host 192.168.56.101 to start etcd:
Etcd-listen-client-urls http://192.168.56.101:2379-advertise-client-urls http://192.168.56.101:2379
For more information on how to install and configure etcd, please refer to the flannel section.
Modify the Docker daemon configuration file / etc/systemd/system/docker.service for host1 and host2, and connect to etcd:
-- cluster-store=etcd://192.168.56.101:2379
Restart Docker daemon.
Systemctl daemon-reload
Systemctl restart docker.service
Deploy calico
Download calicoctl:
Wget-O / usr/local/bin/calicoctl https://github.com/projectcalico/calicoctl/releases/download/v1.0.2/calicoctl
Chmod + x calicoctl
Start calico on host1 and host2:
Calicoctl node run
The startup process is as follows:
① sets up the host network, such as enable IP forwarding.
② downloads and starts the calico-node container, and calico runs as a container (similar to weave).
③ connects to etcd.
④ calico started successfully.
Create a calico network
Create a calico network cal_ent1 by executing the following command on host1 or host2:
Docker network create-- driver calico--ipam-driver calico-ipam cal_net1
-- driver calico specifies the libnetwork CNM driver that uses calico.
-- ipam-driver calico-ipam specifies that the IPAM driver of calico is used to manage IP.
Calico is a global network, and etcd synchronizes the cal_net to all hosts.
After reading the above, have you mastered the method of how to deploy Calico network? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.