In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
All of the following operations are done on the node node
Overview of Flannel Network
Flannel provides a virtual network for the container by assigning a subnet to each host. It is based on Linux TUN/TAP, uses UDP/VXLAN to encapsulate IP packets to create an overlay network, and maintains network allocation with the help of etcd (which also supports kubernetes).
Server role assignment role address installation components master192.168.142.220kube-apiserver kube-controller-manager kube-scheduler etcdnode1192.168.142.136kubelet kube-proxy docker flannel etcdnode2192.168.142.132kubelet kube-proxy docker flannel etcdFlannel network deployment (all node nodes) install docker container
The installation of the docker engine is relatively simple and will not be explained here, just stick to the script brush.
The script is as follows:
#! / bin/bash#Docker engine deployment # install dependency package yum install yum-utils device-mapper-persistent-data lvm2-y # set Ali cloud image source yum-config-manager-- add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo# install Docker-ceyum install-y docker-ce# turn off firewall and enhanced security features systemctl stop firewalld.servicesetenforce start Docker and set it to boot Systemctl start docker.servicesystemctl enable docker.service# image acceleration service (everyone's Ali acceleration address is different Please go to Ali's official website to obtain) tee / etc/docker/daemon.json / etc/sysctl.confsysctl-pservice network restart systemctl restart docker# to check whether the container starts and completes docker imagesif [$?-eq 0] Then echo "Docker startup completes" else echo "ERROR" systemctl status docker exit 1fi assigns subnet segments to the flannel network And inject [root@node2 bin] # / opt/etcd/bin/etcdctl-- ca-file=/opt/etcd/ssl/ca.pem\-- cert-file=/opt/etcd/ssl/server.pem\-- key-file=/opt/etcd/ssl/server-key.pem\-- endpoints= "https://192.168.142.220:2379,https://192.168.142.136:2379," into the etcd database Https://192.168.142.132:2379" set / coreos.com/network/config'{"Network": "172.17.0.0 opt/kubernetes/ 16", "Backend": {"Type": "vxlan"}} 'decompress and install Flannel binary package [root@node2 ~] # tar zxvf flannel-v0.10.0-linux-amd64.tar.gzflanneldmk-docker-opts.shREADME.md// set up working directory [root@node2 ~] # mkdir-p / opt/kubernetes/ {cfg,ssl Bin} / / move to the working directory [root@node2 ~] # mv flanneld mk-docker-opts.sh / opt/kubernetes/bin/ change the flannel configuration file [root@node2 ~] # cat
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.