{"id":717,"date":"2020-12-23T16:51:42","date_gmt":"2020-12-23T08:51:42","guid":{"rendered":"https:\/\/www.myway5.com\/?p=717"},"modified":"2023-07-05T21:22:02","modified_gmt":"2023-07-05T13:22:02","slug":"flannel-multi-backend-implementation","status":"publish","type":"post","link":"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/","title":{"rendered":"flannel \u7684\u591a\u79cd backend \u5b9e\u73b0\u5206\u6790"},"content":{"rendered":"<h2>\u4e00\u3001\u6982\u8ff0<\/h2>\n<p>flannel \u662f\u4e00\u4e2a\u8f83\u7b80\u5355\u7684\u7f51\u7edc\u63d2\u4ef6\uff0c\u5176\u652f\u6301\u591a\u79cd\u7f51\u7edc\u65b9\u6848\uff0c\u53ef\u4ee5\u4f7f\u7528 etcd \u6216\u8005 k8s \u4f5c\u4e3a\u5b58\u50a8\uff0c\u6765\u5b9e\u73b0 docker \u6216\u8005 k8s \u7684\u7f51\u7edc\u3002\u5176\u652f\u6301\u7684\u7f51\u7edc\u65b9\u6848 backend \u6709:<\/p>\n<ul>\n<li>hostgw<\/li>\n<li>udp<\/li>\n<li>vxlan<\/li>\n<li>ipip<\/li>\n<li>ipsec<\/li>\n<\/ul>\n<p>\u540c\u65f6\u4e5f\u652f\u6301\u4e86\u591a\u5bb6\u4e91\u5382\u5546\u7684\u7f51\u7edc\u73af\u5883\uff1a<\/p>\n<ul>\n<li>AliVPC<\/li>\n<li>AWS VPC<\/li>\n<li>GCE<\/li>\n<\/ul>\n<p>\u4e0b\u9762\u4f1a\u7b80\u5355\u4ecb\u7ecd flannel \u7684\u5de5\u4f5c\u539f\u7406\uff0c\u5e76\u4e3b\u8981\u5c31\u6807\u51c6\u73af\u5883\u4e0b\u7684\u7f51\u7edc\u65b9\u6848 backend \u505a\u5206\u6790\u3002<\/p>\n<h2>\u4e8c\u3001flannel \u7f51\u7edc\u65b9\u6848<\/h2>\n<p>flannel \u7684\u90e8\u7f72\u6587\u4ef6\u4e2d\u5305\u542b\u4e00\u4e2a configmap\uff0c\u5176\u4e2d\u5305\u542b flannel cni \u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u4ee5\u53ca flannel \u9700\u8981\u7684 cluster-cidr \u548c\u4f7f\u7528\u7684 backend \u914d\u7f6e\u3002flannel \u901a\u8fc7 daemonset \u8c03\u5ea6\u5230\u6bcf\u4e2a\u8282\u70b9\u4e0a\u3002flannel \u7684 pod \u6709\u4e00\u4e2a init \u5bb9\u5668\uff0c\u8d1f\u8d23\u5c06 configmap \u4e2d\u7684 cni-conf.json \u590d\u5236\u5230\u5bbf\u4e3b\u673a\u4e0a\u7684 <code>\/etc\/cni\/net.d\/10-flannel.conflist<\/code>\u3002\u4e4b\u540e flanneld \u542f\u52a8\uff0c\u5176\u62e5\u6709 <code>NET_ADMIN<\/code> \u548c<code>NET_RAW<\/code> \u7684 capabilities\u3002<\/p>\n<p>\u8fd9\u91cc\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5982\u679c\u4f60\u7684\u9ed8\u8ba4\u8def\u7531\u5bf9\u5e94\u7684\u7f51\u5361\u4e0d\u662f node \u4f7f\u7528\u7684\u7f51\u5361\uff08\u6bd4\u5982\u4f7f\u7528 vagrant \u90e8\u7f72 k8s \u65f6\uff0c\u865a\u62df\u673a\u7684 eth0 \u662f\u9ed8\u8ba4\u7684 nat \u7f51\u5361\uff0c\u4f46\u662f\u4e0d\u7528\u5728 k8s \u96c6\u7fa4\u4e2d\uff09\uff0c\u5e94\u8be5\u4f7f\u7528 <code>--iface=eth1<\/code> \u6765\u6307\u5b9a\u4f7f\u7528\u7684\u7f51\u5361\u3002<\/p>\n<p>flannel \u4f1a\u6839\u636e cluster-cidr \u6765\u4e3a\u6bcf\u4e2a node \u5206\u914d\u5355\u72ec\u7684\u5b50\u7f51\uff0c\u8fd9\u6837\u5c31\u80fd\u4fdd\u8bc1\u4e0d\u540c node \u4e0a\u7684 pod ip \u4e0d\u4f1a\u51b2\u7a81\u3002\u7136\u540e\u6839\u636e\u914d\u7f6e\u6587\u4ef6\u4e2d\u4e0d\u540c\u7684 backend \u6765\u6ce8\u518c\u7f51\u7edc\u3002\u4e0b\u9762\u5c31\u5f00\u59cb\u7b80\u5355\u5206\u6790\u4e0d\u540c backend \u7684\u5de5\u4f5c\u539f\u7406\u3002\u5176\u4e2d<\/p>\n<ol>\n<li>IPIP \u548c VXLAN \u7c7b\u4f3c\uff0c\u4e0d\u8fc7 VXLAN \u5c01\u88c5\u7684\u662f\u4e8c\u5c42\u7684\u5e27\uff0cIPIP \u5c01\u88c5\u7684\u662f IP \u5305\u3002\u8fd9\u91cc\u4e0d\u505a\u5206\u6790\u3002<\/p>\n<\/li>\n<li>\n<p>UDP \u4f7f\u7528\u7684\u5f88\u5c11\uff0c\u4e5f\u4e0d\u505a\u5206\u6790\u3002<\/p>\n<\/li>\n<li>\n<p>IPSEC \u5173\u6ce8\u7684\u662f\u901a\u4fe1\u5b89\u5168\u65b9\u9762\u3002\u4e0d\u662f\u8fd9\u91cc\u5173\u6ce8\u7684\u91cd\u70b9\u3002\u4e0d\u505a\u5206\u6790\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u4e3a\u4e86\u65b9\u4fbf\u540e\u7eed\u7684\u63cf\u8ff0\uff0c\u8fd9\u91cc\u5148\u5217\u4e3e\u51fa\u6574\u4e2a\u96c6\u7fa4\u7684\u6982\u51b5:<\/p>\n<p>cluster cidr: 172.10.0.0\/16<\/p>\n<p>master: 192.168.33.101\uff0c\u5b50\u7f51\u662f 172.10.100.0\/24<\/p>\n<p>node1: 192.168.33.102\uff0c\u5b50\u7f51\u662f 172.10.0.0\/24<\/p>\n<p>node2: 192.168.33.103\uff0c\u5b50\u7f51\u662f 172.10.1.0\/24<\/p>\n<h3>2.1 host-gw<\/h3>\n<p>host-gw \u662f\u6700\u7b80\u5355\u7684 backend\uff0c\u6240\u6709\u7684 pod \u90fd\u4f1a\u88ab\u63a5\u5165\u5230\u865a\u62df\u7f51\u6865 cni0 \u4e0a\uff0c\u7136\u540e\u5b83\u901a\u8fc7\u76d1\u542c subnet \u7684\u66f4\u65b0\uff0c\u6765\u52a8\u6001\u7684\u66f4\u65b0 host \u4e0a\u7684\u8def\u7531\u8868\u3002\u901a\u8fc7\u8def\u7531\u6765\u5b9e\u73b0\u4e0d\u540c node \u4e0a\u7684 pod \u95f4\u901a\u4fe1\u4ee5\u53ca node \u548c pod \u95f4\u7684\u901a\u4fe1\u3002\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/10\/flannel-hostgw.png\" alt=\"flannel-hostgw\" \/><\/p>\n<ol>\n<li>Node1 \u4e0a\u7684 pod A(172.10.0.134) \u548c node2 \u4e0a\u7684 pod B(172.10.1.3) \u901a\u4fe1\u65f6\uff0cA \u6839\u636e namespace \u4e0b\u7684\u8def\u7531\u89c4\u5219<code>default via 172.10.0.1 dev eth0<\/code>\u5c06\u6d41\u91cf\u53d1\u5f80\u7f51\u5173 cni0 \u5230\u8fbe\u5bbf\u4e3b\u673a\u3002<\/li>\n<li>\u6839\u636e\u5bbf\u4e3b\u673a\u8def\u7531\u89c4\u5219 <code>172.10.1.0\/24 via 192.168.33.103 dev eth1<\/code> \uff0c\u901a\u8fc7\u7f51\u5361 eth1 \u53d1\u5f80 192.168.33.103 \u8fd9\u4e2a\u7f51\u5173\uff0c\u800c\u8fd9\u4e2a\u7f51\u5173\u6b63\u597d\u662f node2 \u7684 eth1 \u7f51\u5361 ip\u3002<\/li>\n<li>node2 \u6b64\u65f6\u626e\u6f14\u7f51\u5173\u7684\u89d2\u8272\uff0c\u6839\u636e\u8def\u7531\u89c4\u5219 <code>172.10.1.0\/24 dev cni0 proto kernel scope link src 172.10.1.1<\/code>\uff0c \u901a\u8fc7 cni0 \u53d1\u9001\u3002\u4f7f\u7528 arp \u627e\u5230\u76ee\u6807 ip \u5bf9\u5e94\u7684 mac \u5730\u5740\u3002\u5c06\u4e8c\u5c42\u7684\u76ee\u6807 mac \u5730\u5740\u66ff\u6362\u6210 pod B \u7684 mac \u5730\u5740\u3002\u5c06\u4e8c\u5c42\u7684\u6e90 mac \u5730\u5740\u66ff\u6362\u6210 cni0 \u7684 mac \u5730\u5740\u3002<\/li>\n<li>cni0 \u662f\u4e2a bridge \u8bbe\u5907\u3002\u6839\u636e mac \u8868\u6765\u5c06\u6d41\u91cf\u4ece\u5bf9\u5e94\u7aef\u53e3\u53d1\u9001\u5230 pod B \u4e2d\u3002<\/li>\n<\/ol>\n<p>\u56e0\u4e3a\u901a\u4fe1\u8fc7\u7a0b\u7684\u7b2c 2 \u6b65\u9700\u8981\u5c06\u5176\u4ed6 node \u4f5c\u4e3a\u7f51\u5173\uff0c\u56e0\u6b64 hostgw \u9700\u8981\u6240\u6709 node \u4e8c\u5c42\u4e92\u901a\u3002<\/p>\n<h3>2.2 VXLAN<\/h3>\n<p>\u76f8\u6bd4\u4e8e host-gw \u5fc5\u987b\u8981\u4e8c\u5c42\u4e92\u901a\u3002VXLAN \u662f\u4e2a overlay \u7684\u7f51\u7edc\u5b9e\u73b0\uff0c\u53ea\u9700\u4e09\u5c42\u4e92\u901a\u5373\u53ef\u3002\u5728 flannel \u7684\u5b9e\u73b0\u4e2d\uff0c\u5e76\u6ca1\u6709\u4f7f\u7528 VXLAN \u7684\u5168\u90e8\u80fd\u529b\uff0c\u4ec5\u4ec5\u7528\u5b83\u6765\u505a\u4e8c\u5c42\u5305\u7684\u5c01\u88c5\u548c\u89e3\u5c01\u88c5\u3002\u5176\u6574\u4e2a\u6d41\u7a0b\u56fe\u5982\u4e0b\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/12\/flannel-vxlan-1.png\" alt=\"flannel-vxlan\" \/><\/p>\n<p>\u53ef\u4ee5\u53d1\u73b0\uff0c\u76f8\u6bd4\u4e8e host-gw\uff0c\u589e\u52a0\u4e86 flannel.1 \u8fd9\u4e2a\u8bbe\u5907\u3002\u8fd9\u4e2a flannel \u7684\u8fdb\u7a0b\u5728\u542f\u52a8\u7684\u65f6\u5019\u521b\u5efa\u7684\u3002\u540c\u65f6\u5b83\u8fd8\u4f1a\u76d1\u542c\u6240\u6709\u7684\u5b50\u7f51\uff0c\u6bcf\u4e2a\u8282\u70b9\u52a0\u5165\u7f51\u7edc\u4e2d\uff0c\u90fd\u4f1a\u521b\u5efa\u4e00\u4e2a\u5c5e\u4e8e\u81ea\u5df1\u7684\u5b50\u7f51\u3002flannel \u8fdb\u7a0b\u5728\u76d1\u542c\u5230\u65b0\u7684\u5b50\u7f51\u521b\u5efa\u65f6\uff0c\u4f1a\u5728\u5f53\u524d\u8282\u70b9\u521b\u5efa\u4ee5\u4e0b\uff1a<\/p>\n<ol>\n<li>\u4e00\u6761\u8def\u7531\uff1a<code>172.10.0.0\/24 via 172.10.0.0 dev flannel.1<\/code>\u3002172.10.0.0 \u7684 IP \u662f\u5176\u4ed6\u8282\u70b9\u7684 flannel.1 \u5730\u5740\u3002<\/li>\n<li>\u4e00\u6761 ARP:  <code>172.10.0.0 ether ee:9a:f8:a5:3c:02 CM flannel.1<\/code>\u3002\u5728\u5305\u901a\u8fc7\u8def\u7531\u53d1\u51fa\u53bb\u524d\uff0c\u9700\u8981\u77e5\u9053 172.10.0.0 \u7684\u4e8c\u5c42\u5730\u5740\u3002\u8fd9\u65f6\u5c31\u4f1a\u5339\u914d\u8fd9\u6761 ARP \u8bb0\u5f55\u3002<\/li>\n<li>\u4e00\u6761 FDB\uff1a<code>ee:9a:f8:a5:3c:02 dev flannel.1 dst 192.168.33.102 self permanent<\/code>\u3002\u8fd9\u6761 FDB \u8bb0\u5f55\u4f1a\u5339\u914d\u4e8c\u5c42\u7684\u8f6c\u53d1\u8def\u5f84\u3002<\/li>\n<\/ol>\n<p>\u4e3a\u4e86\u66f4\u597d\u7684\u7406\u89e3 flannel \u7684 vxlan \u5b9e\u73b0\uff0c\u6211\u4eec\u6309\u7167\u56fe\u4e2d\u7684\u6b65\u9aa4\u4e00\u6b65\u6b65\u5206\u6790\u3002<\/p>\n<ol>\n<li>Pod B (172.10.1.3) \u5411 Pod A (172.10.0.134) \u53d1\u9001\u6570\u636e\u3002\u56e0\u4e3a Pod A \u548c Pod B \u7684 IP \u4e0d\u5728\u4e00\u4e2a\u5b50\u7f51\uff0c\u56e0\u6b64\u8d70\u9ed8\u8ba4\u8def\u7531\u8868\uff0c\u53d1\u5411 <code>172.10.1.1<\/code>\u3002\u8fd9\u4e2a\u5730\u5740\u662f cni0 \u7684\u5730\u5740\uff0c\u56e0\u6b64\u53ef\u4ee5\u76f4\u63a5\u53d1\u8fc7\u53bb\u3002<\/p>\n<\/li>\n<li>\n<p>IP \u5305\u5230\u8fbe cni0 \u7f51\u6865\u540e\uff0c\u6839\u636e\u4e3b\u673a\u8def\u7531\u8868 <code>172.10.0.0\/24 via 172.10.0.0 dev flannel.1<\/code>\uff0c\u4e0b\u4e00\u8df3\u662f 172.10.0.0\uff0c\u901a\u8fc7 flannel.1 \u53d1\u9001\u3002<\/p>\n<\/li>\n<li>\n<p>\u6b64\u65f6\u9700\u8981\u77e5\u9053 172.10.0.0 \u7684 mac \u5730\u5740\uff0c\u56e0\u6b64\u68c0\u67e5\u4e3b\u673a\u7684 arp \u8868\u3002\u53d1\u73b0 <code>172.10.0.0 ether ee:9a:f8:a5:3c:02 CM flannel.1<\/code>\uff0c\u56e0\u6b64\u8981\u53d1\u9001\u7684\u5e27\u5982\u4e0b\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/12\/ethernet-frame.png\" alt=\"ethernet-frame\" \/><\/p>\n<\/li>\n<li>\n<p>\u4e8c\u5c42\u5e27\u7684\u8f6c\u53d1\u9700\u8981\u67e5\u627e\u4e3b\u673a\u7684 fdb \u8868\u3002\u8fd9\u91cc\u5339\u914d\u5230 <code>ee:9a:f8:a5:3c:02 dev flannel.1 dst 192.168.33.102 self permanent<\/code>\u3002\u5c01\u88c5\u6210 vxlan \u7684\u5305\u4ece eth1 \u53d1\u51fa\u53bb\u3002\u53d1\u51fa\u53bb\u7684\u5305\u5982\u4e0b\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/12\/vxlan.png\" alt=\"vxlan\" \/><\/p>\n<\/li>\n<li>\n<p>\u5bf9\u7aef\u7684 eth1 \u7f51\u7edc\u6536\u5230\u5305\uff0c\u53d1\u73b0\u662f vxlan\uff0c\u4e8e\u662f\u4f1a\u5bf9\u5305\u89e3\u5c01\u88c5\u3002\u4e8c\u5c42\u5730\u5740\u662f flannel.1 \u8bbe\u5907\u7684 mac \u5730\u5740\u3002\u56e0\u6b64\u53d1\u5230 flannel.1 \u4e0a\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/12\/ethernet-frame.png\" alt=\"ethernet-frame\" \/><\/p>\n<\/li>\n<li>\n<p>\u6b64\u65f6\u4e09\u5c42\u76ee\u6807\u5730\u5740\u662f 172.10.0.134\uff0c\u56e0\u6b64\u5339\u914d\u4e3b\u673a\u7684\u8def\u7531\u8868 <code>172.10.0.0\/24 dev cni0 proto kernel scope link src 172.10.0.1<\/code>\u3002\u8fd9\u4e2a\u8def\u7531\u8868\u6ca1\u6709\u5199\u5728\u4e0a\u56fe\u4e2d\u3002<\/p>\n<\/li>\n<li>\n<p>cni0 \u548c\u6211\u4eec\u7684 pod \u662f\u4e8c\u5c42\u4e92\u901a\u7684\u3002\u56e0\u6b64\u5c06\u5305\u53d1\u7ed9 pod\u3002<\/p>\n<\/li>\n<li>\n<p>pod \u6536\u5230\u5305\u3002\u4e09\u5c42\u7684\u6765\u6e90\u5730\u5740\u662f 172.10.1.3\uff0c\u4e8c\u5c42\u7684\u6765\u6e90\u5730\u5740\u662f cni0 \u7684 mac \u5730\u5740\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u884c\uff0c\u6a21\u62df\u6574\u4e2a\u6d41\u7a0b\u3002<\/p>\n<pre><code class=\"language-bash line-numbers\"># host1\nbr0_ip=\"10.20.1.1\"\nvtep_ip=\"10.20.1.0\/32\"\nendpoint_ip=\"10.20.1.4\/24\"\nsudo ip link add name br0 type bridge forward_delay 1500 hello_time 200 max_age 2000 vlan_protocol 802.1Q\nsudo ip addr add <span class=\"katex math inline\">br0_ip\/24 dev br0\nsudo ip link add name vtep0 type vxlan id 1 dev ens33 srcport 0 0 dstport 4789 nolearning proxy ageing 300\nsudo ip addr add<\/span>vtep_ip dev vtep0\nsudo ip link add name veth0 type veth peer name veth1\nsudo ip netns add n1\nsudo ip link set veth1 netns n1\nsudo ip link set veth0 master br0\nsudo ip netns exec n1 ip addr add <span class=\"katex math inline\">endpoint_ip dev veth1\nsudo ip netns exec n1 ip link set veth1 up\nsudo ip netns exec n1 ip route add default via<\/span>br0_ip dev veth1\nsudo ip link set veth0 up\nsudo ip link set br0 up\nsudo ip link set vtep0 up\n\n# host2\nbr0_ip=\"10.20.2.1\"\nvtep_ip=\"10.20.2.0\/32\"\nendpoint_ip=\"10.20.2.4\/24\"\nsudo ip link add name br0 type bridge forward_delay 1500 hello_time 200 max_age 2000 vlan_protocol 802.1Q\nsudo ip addr add <span class=\"katex math inline\">br0_ip\/24 dev br0\nsudo ip link add name vtep0 type vxlan id 1 dev ens33 srcport 0 0 dstport 4789 nolearning proxy ageing 300\nsudo ip addr add<\/span>vtep_ip dev vtep0\nsudo ip link add name veth0 type veth peer name veth1\nsudo ip netns add n1\nsudo ip link set veth1 netns n1\nsudo ip link set veth0 master br0\nsudo ip netns exec n1 ip addr add <span class=\"katex math inline\">endpoint_ip dev veth1\nsudo ip netns exec n1 ip link set veth1 up\nsudo ip netns exec n1 ip route add default via<\/span>br0_ip dev veth1\nsudo ip link set veth0 up\nsudo ip link set br0 up\nsudo ip link set vtep0 up\n\n\n# host1\nhost2_vtep_mac=\"f2:a4:1f:4e:5c:51\"\nhost2_vtep_ip=\"10.20.2.0\"\nsubnet_mask=\"24\"\nhost2_ip=\"192.168.105.167\"\n# one route\nsudo ip route add <span class=\"katex math inline\">host2_vtep_ip\/<\/span>subnet_mask via <span class=\"katex math inline\">host2_vtep_ip dev vtep0 onlink\n# one arp\nsudo arp -i vtep0 -s<\/span>host2_vtep_ip <span class=\"katex math inline\">host2_vtep_mac\n# one fdb\nsudo bridge fdb add<\/span>host2_vtep_mac dev vtep0 dst <span class=\"katex math inline\">host2_ip\n\n# host2\nhost1_vtep_mac=\"be:ae:0d:f3:da:77\"\nhost1_vtep_ip=\"10.20.1.0\"\nsubnet_mask=\"24\"\nhost1_ip=\"192.168.105.166\"\n# one route\nsudo ip route add<\/span>host1_vtep_ip\/<span class=\"katex math inline\">subnet_mask via<\/span>host1_vtep_ip dev vtep0 onlink\n# one arp\nsudo arp -i vtep0 -s <span class=\"katex math inline\">host1_vtep_ip<\/span>host1_vtep_mac\n# one fdb\nsudo bridge fdb add <span class=\"katex math inline\">host1_vtep_mac dev vtep0 dst<\/span>host1_ip\n\n# host1 and host2\necho \"1\" &gt; \/proc\/sys\/net\/ipv4\/ip_forward\n\n# host1\nip netns exec n1 ping 10.20.2.4\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u6982\u8ff0 flannel \u662f\u4e00\u4e2a\u8f83\u7b80\u5355\u7684\u7f51\u7edc\u63d2\u4ef6\uff0c\u5176\u652f\u6301\u591a\u79cd\u7f51\u7edc\u65b9\u6848\uff0c\u53ef\u4ee5\u4f7f\u7528 etcd \u6216\u8005 k8s \u4f5c\u4e3a\u5b58 &hellip; <a href=\"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">flannel \u7684\u591a\u79cd backend \u5b9e\u73b0\u5206\u6790<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[89,101],"tags":[],"class_list":["post-717","post","type-post","status-publish","format-standard","hentry","category-k8s","category-network"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>flannel \u7684\u591a\u79cd backend \u5b9e\u73b0\u5206\u6790 - \u4e00\u53ea\u5b89\u9759\u7684\u732b<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"flannel \u7684\u591a\u79cd backend \u5b9e\u73b0\u5206\u6790 - \u4e00\u53ea\u5b89\u9759\u7684\u732b\" \/>\n<meta property=\"og:description\" content=\"\u4e00\u3001\u6982\u8ff0 flannel \u662f\u4e00\u4e2a\u8f83\u7b80\u5355\u7684\u7f51\u7edc\u63d2\u4ef6\uff0c\u5176\u652f\u6301\u591a\u79cd\u7f51\u7edc\u65b9\u6848\uff0c\u53ef\u4ee5\u4f7f\u7528 etcd \u6216\u8005 k8s \u4f5c\u4e3a\u5b58 &hellip; \u7ee7\u7eed\u9605\u8bfbflannel \u7684\u591a\u79cd backend \u5b9e\u73b0\u5206\u6790\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/\" \/>\n<meta property=\"og:site_name\" content=\"\u4e00\u53ea\u5b89\u9759\u7684\u732b\" \/>\n<meta property=\"article:published_time\" content=\"2020-12-23T08:51:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-05T13:22:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/10\/flannel-hostgw.png\" \/>\n<meta name=\"author\" content=\"jiangpengfei\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"jiangpengfei\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/\"},\"author\":{\"name\":\"jiangpengfei\",\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"headline\":\"flannel \u7684\u591a\u79cd backend \u5b9e\u73b0\u5206\u6790\",\"datePublished\":\"2020-12-23T08:51:42+00:00\",\"dateModified\":\"2023-07-05T13:22:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/\"},\"wordCount\":158,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"image\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/10\/flannel-hostgw.png\",\"articleSection\":[\"k8s\",\"\u7f51\u7edc\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/\",\"url\":\"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/\",\"name\":\"flannel \u7684\u591a\u79cd backend \u5b9e\u73b0\u5206\u6790 - \u4e00\u53ea\u5b89\u9759\u7684\u732b\",\"isPartOf\":{\"@id\":\"https:\/\/www.myway5.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/10\/flannel-hostgw.png\",\"datePublished\":\"2020-12-23T08:51:42+00:00\",\"dateModified\":\"2023-07-05T13:22:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/#primaryimage\",\"url\":\"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/10\/flannel-hostgw.png\",\"contentUrl\":\"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/10\/flannel-hostgw.png\",\"width\":2037,\"height\":1350},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.myway5.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"flannel \u7684\u591a\u79cd backend \u5b9e\u73b0\u5206\u6790\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.myway5.com\/#website\",\"url\":\"https:\/\/www.myway5.com\/\",\"name\":\"\u4e00\u53ea\u5b89\u9759\u7684\u732b\",\"description\":\"\u60f3\u5565\u5462\",\"publisher\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.myway5.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\",\"name\":\"jiangpengfei\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g\",\"caption\":\"jiangpengfei\"},\"logo\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/www.myway5.com\/index.php\/author\/joyme\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"flannel \u7684\u591a\u79cd backend \u5b9e\u73b0\u5206\u6790 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/","og_locale":"zh_CN","og_type":"article","og_title":"flannel \u7684\u591a\u79cd backend \u5b9e\u73b0\u5206\u6790 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","og_description":"\u4e00\u3001\u6982\u8ff0 flannel \u662f\u4e00\u4e2a\u8f83\u7b80\u5355\u7684\u7f51\u7edc\u63d2\u4ef6\uff0c\u5176\u652f\u6301\u591a\u79cd\u7f51\u7edc\u65b9\u6848\uff0c\u53ef\u4ee5\u4f7f\u7528 etcd \u6216\u8005 k8s \u4f5c\u4e3a\u5b58 &hellip; \u7ee7\u7eed\u9605\u8bfbflannel \u7684\u591a\u79cd backend \u5b9e\u73b0\u5206\u6790","og_url":"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/","og_site_name":"\u4e00\u53ea\u5b89\u9759\u7684\u732b","article_published_time":"2020-12-23T08:51:42+00:00","article_modified_time":"2023-07-05T13:22:02+00:00","og_image":[{"url":"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/10\/flannel-hostgw.png","type":"","width":"","height":""}],"author":"jiangpengfei","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"jiangpengfei","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/#article","isPartOf":{"@id":"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/"},"author":{"name":"jiangpengfei","@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"headline":"flannel \u7684\u591a\u79cd backend \u5b9e\u73b0\u5206\u6790","datePublished":"2020-12-23T08:51:42+00:00","dateModified":"2023-07-05T13:22:02+00:00","mainEntityOfPage":{"@id":"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/"},"wordCount":158,"commentCount":1,"publisher":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"image":{"@id":"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/#primaryimage"},"thumbnailUrl":"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/10\/flannel-hostgw.png","articleSection":["k8s","\u7f51\u7edc"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/","url":"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/","name":"flannel \u7684\u591a\u79cd backend \u5b9e\u73b0\u5206\u6790 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","isPartOf":{"@id":"https:\/\/www.myway5.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/#primaryimage"},"image":{"@id":"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/#primaryimage"},"thumbnailUrl":"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/10\/flannel-hostgw.png","datePublished":"2020-12-23T08:51:42+00:00","dateModified":"2023-07-05T13:22:02+00:00","breadcrumb":{"@id":"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/#primaryimage","url":"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/10\/flannel-hostgw.png","contentUrl":"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/10\/flannel-hostgw.png","width":2037,"height":1350},{"@type":"BreadcrumbList","@id":"https:\/\/www.myway5.com\/index.php\/2020\/12\/23\/flannel-multi-backend-implementation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.myway5.com\/"},{"@type":"ListItem","position":2,"name":"flannel \u7684\u591a\u79cd backend \u5b9e\u73b0\u5206\u6790"}]},{"@type":"WebSite","@id":"https:\/\/www.myway5.com\/#website","url":"https:\/\/www.myway5.com\/","name":"\u4e00\u53ea\u5b89\u9759\u7684\u732b","description":"\u60f3\u5565\u5462","publisher":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.myway5.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685","name":"jiangpengfei","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.myway5.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g","caption":"jiangpengfei"},"logo":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/image\/"},"url":"https:\/\/www.myway5.com\/index.php\/author\/joyme\/"}]}},"views":6028,"_links":{"self":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/comments?post=717"}],"version-history":[{"count":1,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/717\/revisions"}],"predecessor-version":[{"id":718,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/717\/revisions\/718"}],"wp:attachment":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/media?parent=717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/categories?post=717"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/tags?post=717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}