{"id":159072,"date":"2020-09-23T03:54:50","date_gmt":"2020-09-22T19:54:50","guid":{"rendered":"http:\/\/4563.org\/?p=159072"},"modified":"2020-09-23T03:54:50","modified_gmt":"2020-09-22T19:54:50","slug":"%e8%87%aa%e7%a0%94-cni-%e6%8f%92%e4%bb%b6%e5%9b%ba%e5%ae%9a-ip-%e5%b8%a6%e6%9d%a5%e7%9a%84%e9%97%ae%e9%a2%98%ef%bc%8c%e6%b1%82%e5%8a%a9%e4%b8%80%e4%b8%8b%e5%90%84%e4%bd%8d","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=159072","title":{"rendered":"\u81ea\u7814 CNI \u63d2\u4ef6\u56fa\u5b9a IP \u5e26\u6765\u7684\u95ee\u9898\uff0c\u6c42\u52a9\u4e00\u4e0b\u5404\u4f4d"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u81ea\u7814 CNI \u63d2\u4ef6\u56fa\u5b9a IP \u5e26\u6765\u7684\u95ee\u9898\uff0c\u6c42\u52a9\u4e00\u4e0b\u5404\u4f4d               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zhangtao <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u7531\u4e8e\u6211\u53f8\u4e1a\u52a1\u548c\u8fd0\u7ef4\u73af\u5883\u7b49\u591a\u65b9\u9762\u8981\u6c42\uff0c\u6211\u4eec\u4f7f\u7528\u4e86 CNI \u63d2\u4ef6 + macvlan \u8fd9\u79cd\u65b9\u5f0f\uff0c\u5b9e\u73b0\u4e86 pod ip \u7684\u56fa\u5b9a\u3002<br \/>\u53ef\u4ee5\u8fd9\u6837\u7406\u89e3\uff1a\u5373\u4e00\u4e2a\u670d\u52a1\u6211\u4eec\u4f1a\u7ed9\u5b83\u5206\u914d\u597d\u4e00\u4e2a IP range \uff08 10.0.0.1 ~ 10.0.0.10 \uff09\uff0c\u8fd9\u4e2a\u670d\u52a1\u7684 pod ip \u59cb\u7ec8\u662f\u5728\u8fd9\u4e2a\u8303\u56f4\u5185\u3002<\/p>\n<p>\u6b63\u5e38\u60c5\u51b5\u4e0b\uff0cpod \u6b63\u5e38\u5173\u95ed\u5373\u53ef\u91ca\u653e ip \u8d44\u6e90\u3002\u4f46\u662f\u9047\u5230\u5f02\u5e38\u60c5\u51b5\uff08\u4f8b\u5982 k8s node \u5b95\u673a\uff09\u5219\u4f1a\u5bfc\u81f4 ip \u8d44\u6e90\u65e0\u6cd5\u91ca\u653e\uff0c\u9700\u8981\u4eba\u5de5\u8ddf\u8fdb\u624b\u5de5\u5904\u7406\u3002<\/p>\n<p>\u4e0d\u77e5\u6709\u6ca1\u6709\u4ec0\u4e48\u597d\u7684\u529e\u6cd5\u89e3\u51b3\u6b64\u7c7b\u95ee\u9898\uff1f      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>20<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3419113\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yuzhiquan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5728 ipam \u91cc\u7ef4\u62a4\u4e00\u4e2a\u56fa\u5b9a ip \u548c pod \u7684\u5bf9\u5e94\u72b6\u6001\uff0c\u5f02\u5e38\u72b6\u6001\u4e0b\u7684\u672a\u91ca\u653e ip\uff0c\u8fd9\u8fb9\u662f\u96c6\u7fa4\u91cc\u90e8\u7f72\u4e00\u4e2a cronjob \u5b9a\u671f\u6e05\u7406&#8230;                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419114\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : rrfeng <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             node \u5b95\u673a\u81ea\u7136 pod \u4e5f\u4e0d\u5b58\u5728\u4e86\u554a\uff0c\u6216\u8005\u8fc1\u79fb\u4e86\u3002pod \u4e0d\u5b58\u5728\u4e86 controller \u81ea\u7136\u53ef\u4ee5\u66f4\u65b0 ipam \u3002<br \/>\u611f\u89c9\u4f60\u903b\u8f91\u8bbe\u8ba1\u7684\u6709\u6f0f\u6d1e\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419115\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yuzhiquan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @rrfeng node \u7a81\u7136\u6302\u6389\u7684\u8bdd\uff0ccri \u6ca1\u529e\u6cd5\u8c03\u7528 cni \u8d70\u4e00\u904d del \u6d41\u7a0b\uff0c\u53ef\u80fd\u4f1a\u9020\u6210 pod ip \u6ca1\u91ca\u653e                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419116\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : FabricPath <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5199\u4e2a controller \u53bb\u5b9a\u671f\u5168\u91cf\u540c\u6b65                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419117\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : zhangtao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @rrfeng node \u6302\u6389\u4e4b\u540e\uff0c\u8fd9\u53f0 node \u4e0a\u7684 kubelet \u662f\u65e0\u6cd5\u6b63\u5e38\u5de5\u4f5c\u7684\uff0c\u6240\u4ee5\u6ca1\u6cd5\u8c03\u7528 CNI \u7684\u4e8c\u8fdb\u5236                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419118\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : menyakun <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             CNI \u7684 CmdDel \u5176\u5b9e\u4e0d\u80fd\u5b8c\u5168\u4fe1\u4efb\uff0c\u6211\u9047\u5230\u8fc7 Pod \u88ab\u5220\u9664\uff0c\u4f46\u8fd9\u4e2a\u51fd\u6570\u6ca1\u88ab\u8c03\u7528\u7684\u60c5\u51b5\u3002<br \/>\u6700\u597d\u662f\u5728 controller \u91cc\u9762\u5904\u7406 Pod \u548c IP \u7684\u7ed1\u5b9a\u5173\u7cfb\uff0cCNI plugin \u8fd9\u5c42\u53ea\u662f\u7b49\u5f85 Pod \u7684 IP \u88ab\u5206\u914d\u597d\u3002<br \/>\u5173\u4e8e\u8fd9\u4e9b\u5f02\u5e38 IP \u7684\u6e05\u7406\uff0c\u8fd8\u662f\u8981\u6bcf\u4e2a\u8282\u70b9\u4e00\u4e2a Daemon \u6765\u5904\u7406\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419119\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : zhangtao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @FabricPath \u8fd9\u4e2a\u65b9\u6848\u6211\u4eec\u8003\u8651\u8fc7\uff0c\u4f46\u662f\u611f\u89c9\u4e0d\u662f\u5f88\u4f18\u96c5\uff0c\u6240\u4ee5\u60f3\u770b\u770b\u6709\u6ca1\u6709\u66f4\u597d\u7684\u529e\u6cd5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419120\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : zhangtao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @menyakun \u8bf7\u95ee\u4e0b \u5982\u4f55\u5728 conroller \u4e2d\u5904\u7406 Pod \u548c IP \u7684\u7ed1\u5b9a\u5173\u7cfb\uff0c\u80fd\u5426\u8bf4\u7684\u8be6\u7ec6\u4e9b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419121\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : choury <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u4eec\u6ca1\u6709 node \u6545\u969c\u5904\u7406\u6d41\u7a0b\u5417\uff0c\u5c31\u7b97\u8fd9\u4e2a node \u6302\u6389\u4e86\uff0c\u8fd9\u4e2a ip \u4e5f\u662f\u7ed1\u5b9a\u5728\u8fd9\u4e2a node \u4e0a\u7684\u554a\uff0c\u4e0b\u67b6 node \u7684\u65f6\u5019\u6e05\u7406\u6389\u4e0a\u9762\u7684 ip \u4e0d\u5c31\u884c\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419122\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : zhangtao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @choury \u4e0b\u67b6 node \u6ca1\u95ee\u9898\uff0c\u73b0\u5728\u7684\u95ee\u9898\u662f node \u5f02\u5e38\u5b95\u673a\uff0c\u6211\u4eec\u4e0d\u5e0c\u671b\u4eba\u5de5\u4ecb\u5165\u5904\u7406\uff0c\u5e0c\u671b node \u5f02\u5e38\u5b95\u673a\u6574\u4e2a\u8fc7\u7a0b\u662f\u5168\u81ea\u52a8\u5316 \u4e0d\u5f71\u54cd\u4e1a\u52a1\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419123\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : choury <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zhangtao #10 \u4f60\u4eec\u662f ip \u592a\u5c11\uff0c\u6240\u4ee5\u8981\u5feb\u901f\u56de\u6536\u5417\uff1f\u6309\u7167\u6211\u7684\u7406\u89e3\uff0cnode \u5f02\u5e38\u5b95\u673a\uff0c\u5982\u679c\u80fd\u81ea\u52a8\u4fee\u590d\uff0ckubelet \u80af\u5b9a\u5df2\u7ecf\u8d77\u6765\u4e86\uff0c\u5c31\u4f1a\u8c03\u7528 cni \u7684\u5220\u9664\u64cd\u4f5c\uff0c\u5982\u679c node \u8d77\u4e0d\u6765\u4e86\uff0c\u8d70\u4e0b\u67b6 node \u6d41\u7a0b\uff0c\u6e05\u7406\u6389\u8fd9\u4e2a node \u7ed1\u5b9a\u7684\u6240\u6709\u8d44\u6e90<br \/>\u8fd8\u662f\u4f60\u4eec\u9047\u5230\u7684\u662f node \u8d77\u6765\u4e86\uff0c\u4f46\u662f kubelet \u5e76\u6ca1\u6709\u8c03\u7528 cni \u7684\u91ca\u653e ip \u64cd\u4f5c\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419124\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : zhangtao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @choury \u4e0d\u662f ip \u591a\u5c11\u7684\u95ee\u9898\uff0c\u662f ip \u6570\u91cf\u56fa\u5b9a\u4e86\uff1b\u6bd4\u5982\u4e1a\u52a1 A \u9700\u8981 10 \u4e2a pod\uff0c\u56e0\u6b64\u5c31\u914d\u7f6e\u4e86\u4e00\u4e2a\u6709 10 \u4e2a ip \u7684 ip \u6bb5<\/p>\n<p>\u7531\u4e8e ip \u672a\u6b63\u5e38\u91ca\u653e\uff0c\u5373\u4f7f pod \u91cd\u65b0\u8c03\u5ea6\u4e4b\u540e\u4e5f\u62ff\u4e0d\u5230\u53ef\u7528 ip\uff0c\u5bfc\u81f4 pod \u4e00\u76f4\u5728 pending \u72b6\u6001                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419125\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : choury <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zhangtao #12 \u8fd9\u4e2a\u914d\u7f6e\u672c\u6765\u5c31\u6709\u95ee\u9898\uff0c\u9700\u8981\u7ed9\u70b9\u4f59\u91cf\u7684\uff0c\u5305\u62ec\u6eda\u52a8\u66f4\u65b0\u4ec0\u4e48\u7684\u4e5f\u9700\u8981\u591a\u4f59\u7684 ip\uff0c\u800c\u4e14\u4e0d\u7ba1\u7528\u4ec0\u4e48\u6d41\u7a0b\uff0cnode \u5f02\u5e38\u540e\u7684\u5904\u7406\u90fd\u662f\u8981\u65f6\u95f4\u7684\uff0c\u8fd9\u6bb5\u65f6\u95f4\u96be\u9053 pod \u5c31\u4e0d\u8fd0\u884c\u4e86\u5417                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419126\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : defunct9 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4fe1\u4e5f\u79d1\u6280 https:\/\/github.com\/ppdaicorp \u8bf4\u662f\u628a\u6539\u9020\u8fc7\u7684 Macvlan \u63d2\u4ef6\u8fdb\u884c\u4e86\u5f00\u6e90                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419127\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yuzhiquan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zhangtao \u989d\uff0c\u4f60\u4eec\u7684 ipam \u7684 backend \u7528\u7684\u5565\uff1f host-local \uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419128\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : zhangtao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @yuzhiquan etcd                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419129\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yuzhiquan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zhangtao \u54e6\uff0c\u5982\u679c\u9700\u8981\u56fa\u5b9a ip\uff0c\u90a3 ip \u5c31\u662f\u670d\u52a1\u7684\u4e00\u79cd\u72b6\u6001\uff0c\u5c31\u5efa\u8bae\u4f7f\u7528 statefulset \u6765\u90e8\u7f72\uff0c\u8fd9\u6837\u53d1\u5e03\u8fc7\u7a0b\u4e2d\u4fdd\u6301 podname \u4e0d\u53d8\uff0cip \u5c31\u4e0d\u53d8\uff0c\u5c31\u4e0d\u7528\u62c5\u5fc3\u4e0a\u9762\u7684\u60c5\u51b5\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419130\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : menyakun <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zhangtao \u628a IP \u5f53\u4f5c\u4e00\u4e2a\u5355\u72ec\u7684 CRD \u5c31\u884c\u4e86\uff0cPod \u7684 ownerReference \u662f IP \uff1b\u7136\u540e\u52a0\u4e2a MutationWebhook \u5728 Pod \u8fd9\u4e2a\u8d44\u6e90\u4e0a\uff0c\u5904\u7406 Pod \u4e0e IP \u7684\u7ed1\u5b9a\u5173\u7cfb                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419131\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : andyangyu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @menyakun \u5b66\u4e60\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3419132\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : zhangtao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @menyakun \u611f\u8c22                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u81ea\u7814 CNI \u63d2\u4ef6\u56fa\u5b9a IP \u5e26\u6765&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/159072"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=159072"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/159072\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=159072"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=159072"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=159072"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}