> etcdctl ls -r #列出键值存储的目录
> etcdctl get /flannel/network/config #查看键值存储
{"Network":"10.233.0.0/16","SubnetLen":25,"Backend":{"Type":"host-gw","VNI":1}} #host-gw介绍如下
host-gw 模式通过建立主机 IP 到主机上对应 flannel 子网的 mapping,以直接路由的方式联通 flannel 的各个子网。这种互联方式没有 vxlan 等封装方式带来的负担,通过路由机制,实现 flannel 网络数据包在主机之间的转发。但是这种方式也有不足,那就是所有节点之间都要相互有点对点的路由覆盖,并且所有加入 flannel 网络的主机需要在同一个 LAN 里面
VXLAN 是一个在已有的3层物理网络上构建2层逻辑网络的协议。参考了如下资料。
vxlan 协议原理简介 https://cizixs.com/2017/09/25/vxlan-protocol-introduction/
VXLAN 技术研究 https://blog.csdn.net/sinat_31828101/article/details/50504656
Flannel 中 vxlan backend 的原理和实现 http://dockone.io/article/2216
> etcdctl set /flannel/network/config '{"Network":"10.233.0.0/16","SubnetLen":25,"Backend":{"Type":"vxlan","VNI":1}}' #修改成vxlan
> route # 重启flannel后 查看路由
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default gateway 0.0.0.0 UG 300 0 0 bond0
10.233.20.128 0.0.0.0 255.255.255.128 U 0 0 0 docker0
10.233.21.0 10.233.21.0 255.255.255.128 UG 0 0 0 flannel.1
10.233.27.0 10.233.27.0 255.255.255.128 UG 0 0 0 flannel.1





●K8S 上部署 Redis-cluster 三主三从 集群
●运维精华
文章转载自51reboot运维开发,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。





