{"id":530,"date":"2020-01-16T21:06:52","date_gmt":"2020-01-16T13:06:52","guid":{"rendered":"https:\/\/www.myway5.com\/?p=530"},"modified":"2023-07-05T21:35:12","modified_gmt":"2023-07-05T13:35:12","slug":"kubernetes-flexvolume","status":"publish","type":"post","link":"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/","title":{"rendered":"kubernetes\u5b58\u50a8&#8211;FlexVolume"},"content":{"rendered":"<h2>\u7b80\u4ecb<\/h2>\n<p>kubernetes \u4f7f\u7528 volume \u6765\u6ee1\u8db3\u5b83\u7684\u5b58\u50a8\u9700\u6c42\uff0c\u5b83\u652f\u6301\u5f88\u591a\u7684\u5b58\u50a8\u7cfb\u7edf\uff0c\u6bd4\u5982 nfs\u3001 glusterfs\u3001cephfs\u7b49\u7b49\uff0c\u4f46\u662f\u8fd9\u4e9b\u5b58\u50a8\u7684\u5b9e\u73b0\u65b9\u5f0f\u6709\u4e00\u4e2a\u95ee\u9898\uff0c\u5c31\u662f\u5b83\u4eec\u7684\u5b9e\u73b0\u4ee3\u7801\u90fd\u5fc5\u987b\u5408\u5e76\u5230 Kubernetes \u7684\u4ee3\u7801\u4e2d\uff08\u79f0\u4e3a in-tree\uff09\uff0c\u8fd9\u4e3a kubernetes \u793e\u533a\u5e26\u6765\u4e86\u7ef4\u62a4\u4e0a\u7684\u6210\u672c\u3002\u56e0\u6b64\uff0ckubernetes \u63d0\u51fa\u4e86\u4e24\u79cd out-of-tree \u7684\u65b9\u6848: FlexVolume \u548c csi\u3002\u901a\u8fc7\u8fd9\u4e24\u79cd\u65b9\u6848\u5b9e\u73b0\u7684\u5b58\u50a8\u529f\u80fd\u4e0d\u5fc5\u5408\u5e76\u5230 kubernetes \u7684\u4ee3\u7801\u4ed3\u5e93\uff0c\u7531\u5b58\u50a8\u7cfb\u7edf\u7684\u4f9b\u5e94\u5546\u5355\u72ec\u7ef4\u62a4\u3002<\/p>\n<p>FlexVolume \u662f\u8fd9\u7bc7\u6587\u7ae0\u4e3b\u8981\u5173\u6ce8\u7684\u70b9\uff0cFlexVolume \u81ea 1.2 \u7248\u672c\u5f00\u59cb\u5c31\u652f\u6301\u4e86\u3002\u5b83\u4f7f\u7528\u57fa\u4e8e exec \u7684\u6a21\u578b\u6765\u4e0e\u9a71\u52a8\u7a0b\u5e8f\u5bf9\u63a5\u3002\u7528\u6237\u5fc5\u987b\u5728\u6bcf\u4e2a\u8282\u70b9\uff08\u6709\u4e9b\u60c5\u51b5\u4e0b\u5305\u62ec\u4e3b\u8282\u70b9\uff09\u4e0a\u7684\u9884\u5b9a\u4e49\u5377\u63d2\u4ef6\u8def\u5f84\u4e2d\u5b89\u88c5 FlexVolume \u9a71\u52a8\u7a0b\u5e8f\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002\u5f53\u9700\u8981\u6302\u8f7d volume \u7684\u65f6\u5019\uff0c\u7531 kubelet \u6267\u884c\u6302\u8f7d\u547d\u4ee4\u6765\u6302\u8f7d\u5373\u53ef\u3002<\/p>\n<h2>\u57fa\u4e8e nfs \u5b9e\u73b0 FlexVolume<\/h2>\n<p>\u5728\u63a2\u7a76 FlexVolume \u7684\u5b9e\u73b0\u539f\u7406\u4e4b\u524d\uff0c\u6211\u4eec\u53ef\u4ee5\u5148\u770b\u4e00\u4e0b\u5b98\u65b9\u63d0\u4f9b\u7684<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/kubernetes\/examples\/tree\/master\/staging\/volumes\/flexvolume\">\u57fa\u4e8e nfs \u7684\u4f8b\u5b50<\/a>\u3002<\/p>\n<p>\u6ce8: \u6211\u8fd9\u91cc\u662f\u7528 <code>minikube<\/code> \u542f\u52a8\u7684\u672c\u5730 kubernetes \u96c6\u7fa4\u3002<\/p>\n<p>\u4e3a\u4e86\u90e8\u7f72\u57fa\u4e8e nfs \u5b9e\u73b0\u7684 FlexVolume\uff0c\u6211\u4eec\u9996\u5148\u5c06\u76ee\u5f55\u4e0b\u7684 nfs \u590d\u5236\u5230 <code>deploy<\/code> \u6587\u4ef6\u5939\u4e0b<\/p>\n<pre><code class=\"language-shell line-numbers\">$ cp nfs deploy\n<\/code><\/pre>\n<p>\u7136\u540e\u5c06 <code>deploy\/deploy.sh<\/code> \u4e2d\u7684 <code>dummy<\/code> \u4fee\u6539\u6210 <code>nfs<\/code>\uff0c\u8868\u793a\u6211\u4eec\u4f7f\u7528\u7684\u63d2\u4ef6\u811a\u672c\u662f <code>nfs<\/code> \u8fd9\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<p>\u63a5\u7740\u5728 <code>deploy<\/code> \u6587\u4ef6\u5939\u4e0b\u6784\u5efa docker \u955c\u50cf\uff0c\u8fd9\u91cc\u8981\u4fee\u6539 <code>Dockerfile<\/code>\uff0c\u5c06 nfs <code>COPY<\/code> \u5230\u955c\u50cf\u4e2d\u3002\u7136\u540e\u6267\u884c\u4e0b\u9762\u7684\u547d\u4ee4\uff08\u955c\u50cf\u6807\u7b7e\u9700\u8981\u4fee\u6539\u6210\u4f60\u81ea\u5df1\u7684\uff09\uff1a<\/p>\n<pre><code class=\"language-shell line-numbers\">$ docker build -t joyme\/nfs-flexvolume:1.0 .\n$ docker push joyme\/nfs-flexvolume:1.0\n<\/code><\/pre>\n<p>\u955c\u50cf\u6784\u5efa\u5e76\u63a8\u9001\u5b8c\u6210\u4e4b\u540e\uff0c\u6211\u4eec\u5c31\u5f00\u59cb\u90e8\u7f72\u4e86\u3002\u56e0\u4e3a FlexVolume \u8981\u6c42\u5c06\u9a71\u52a8\u6587\u4ef6\u653e\u5728\u6307\u5b9a\u7684\u76ee\u5f55\u4e0b\uff0c\u6700\u7c97\u66b4\u7684\u65b9\u5f0f\u5c31\u662f\u624b\u52a8\u5c06\u6587\u4ef6 scp \u5230\u96c6\u7fa4\u7684\u6bcf\u4e2a\u8282\u70b9\u4e0a\u3002\u8fd9\u91cc\u4e3a\u4e86\u65b9\u4fbf\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528 kubernetes \u7684 <code>Daemenset<\/code>\uff0c\u7136\u540e\u4f7f\u7528 hostPath \u5c06\u6587\u4ef6\u653e\u5230\u4e3b\u673a\u4e4b\u4e0a\u3002\u6211\u4eec\u4fee\u6539 <code>deploy<\/code> \u6587\u4ef6\u5939\u4e0b\u7684 <code>ds.yaml<\/code> \u8fd9\u4e2a\u90e8\u7f72\u6587\u4ef6\u3002\u5c06\u6211\u4eec\u521a\u521a\u63a8\u9001\u7684\u955c\u50cf\u586b\u8fdb\u53bb\u3002\u7136\u540e\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u90e8\u7f72\u3002<\/p>\n<pre><code class=\"line-numbers\">$ kubectl apply -f ds.yaml\n<\/code><\/pre>\n<p>\u8fd9\u91cc\u6709\u4e2a\u5730\u65b9\u8981\u6ce8\u610f\uff0c \u9ed8\u8ba4\u7684\u63d2\u4ef6\u5b89\u88c5\u5730\u5740\u662f <code>\/usr\/libexec\/kubernetes\/kubelet-plugins\/volume\/exec\/<\/code>, \u4f46\u662f kubelet \u7684\u53c2\u6570 <code>--volume-plugin-dir<\/code> \u548c controller manager \u7684\u53c2\u6570 <code>--flex-volume-plugin-dir<\/code> \u90fd\u53ef\u4ee5\u4fee\u6539\u8fd9\u4e2a\u503c\uff0c\u5982\u679c\u4f60\u542f\u52a8\u8fd9\u4e9b\u7ec4\u4ef6\u662f\u6307\u5b9a\u4e86\u8fd9\u4e9b\u53c2\u6570\uff0c\u90a3\u5c31\u9700\u8981\u4fee\u6539 <code>ds.yaml<\/code> \u4e2d\u7684\u8def\u5f84\u3002<\/p>\n<p>\u5728\u96c6\u7fa4\u4e2d\u90e8\u7f72\u5b8c\u6210\u4e4b\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5230\u67d0\u4e2a\u8282\u70b9\u4e0a\u68c0\u67e5\u4e00\u4e0b<code>\/usr\/libexec\/kubernetes\/kubelet-plugins\/volume\/exec\/<\/code>\u662f\u5426\u5b58\u5728\u6211\u4eec\u521a\u521a\u90e8\u7f72\u7684\u6587\u4ef6\u3002<\/p>\n<p>\u6700\u540e\u6211\u4eec\u521b\u5efa\u4e00\u4e2a nginx\uff0c\u6302\u8f7d\u4e00\u4e2a FlexVolume\u3002\u5728\u521b\u5efa\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5148\u542f\u52a8\u4e00\u4e2a nfs server\uff0c\u8fd9\u91cc\u4e3a\u4e86\u65b9\u4fbf\uff0c\u53ef\u4ee5\u4f7f\u7528\u5bb9\u5668\u542f\u52a8\u4e00\u4e2a\u3002<\/p>\n<pre><code class=\"language-shell line-numbers\">$ docker run -d --privileged --restart=always \\\n-v \/tmp:\/dws_nas_scratch \\\n-e NFS_EXPORT_DIR_1=\/dws_nas_scratch \\\n-e NFS_EXPORT_DOMAIN_1=\\* \\\n-e NFS_EXPORT_OPTIONS_1=ro,insecure,no_subtree_check,no_root_squash,fsid=1 \\\n-p 111:111 -p 111:111\/udp \\\n-p 2049:2049 -p 2049:2049\/udp \\\n-p 32765:32765 -p 32765:32765\/udp \\\n-p 32766:32766 -p 32766:32766\/udp \\\n-p 32767:32767 -p 32767:32767\/udp \\\nfuzzle\/docker-nfs-server:latest\n<\/code><\/pre>\n<p>\u4f7f\u7528\u5b98\u65b9\u63d0\u4f9b\u7684 <code>nginx-nfs.yaml<\/code> \u6587\u4ef6\uff0c\u7136\u540e\u628a\u5176\u4e2d\u7684 server \u5730\u5740\u4fee\u6539\u4e00\u4e0b\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa:<\/p>\n<pre><code class=\"language-shell line-numbers\">$ kubectl apply -f nginx-nfs.yaml\n<\/code><\/pre>\n<p>\u6ce8\u610f\uff1a\u5982\u679c\u51fa\u73b0\u9519\u8bef\uff0c\u53ef\u4ee5\u68c0\u67e5 node \u4e0a\u662f\u5426\u5b89\u88c5\u4e86 <code>jq<\/code>, <code>nfs-common<\/code> \u7b49\u5fc5\u8981\u7684\u4f9d\u8d56\u5305\u3002<\/p>\n<h2>\u5b9e\u73b0\u539f\u7406<\/h2>\n<p>\u5728\u5b8c\u6210\u4e0a\u9762\u4f8b\u5b50\u7684\u8fc7\u7a0b\u4e2d\uff0c\u5173\u4e8e FlexVolume \u7684\u5927\u591a\u6570\u95ee\u9898\u90fd\u6bd4\u8f83\u597d\u89e3\u7b54\u4e86\u3002\u6211\u4eec\u6765\u770b\u4e00\u4e0b <code>nfs<\/code> \u7684\u5b9e\u73b0\u4ee3\u7801:<\/p>\n<pre><code class=\"language-shell line-numbers\">usage() {\n    err \"Invalid usage. Usage: \"\n    err \"\\t<span class=\"katex math inline\">0 init\"\n    err \"\\t<\/span>0 mount &lt;mount dir&gt; &lt;json params&gt;\"\n    err \"\\t<span class=\"katex math inline\">0 unmount &lt;mount dir&gt;\"\n    exit 1\n}\n\nerr() {\n    echo -ne<\/span>* 1&gt;&amp;2\n}\n\nlog() {\n    echo -ne <span class=\"katex math inline\">* &gt;&amp;1\n}\n\nismounted() {\n    MOUNT=`findmnt -n<\/span>{MNTPATH} 2&gt;\/dev\/null | cut -d' ' -f1`\n    if [ \"<span class=\"katex math inline\">{MOUNT}\" == \"<\/span>{MNTPATH}\" ]; then\n        echo \"1\"\n    else\n        echo \"0\"\n    fi\n}\n\ndomount() {\n    MNTPATH=<span class=\"katex math inline\">1\n\n    NFS_SERVER=<\/span>(echo <span class=\"katex math inline\">2 | jq -r '.server')\n    SHARE=<\/span>(echo <span class=\"katex math inline\">2 | jq -r '.share')\n\n    if [<\/span>(ismounted) -eq 1 ] ; then\n        log '{\"status\": \"Success\"}'\n        exit 0\n    fi\n\n    mkdir -p <span class=\"katex math inline\">{MNTPATH} &amp;&gt; \/dev\/null\n\n    mount -t nfs<\/span>{NFS_SERVER}:\/<span class=\"katex math inline\">{SHARE}<\/span>{MNTPATH} &amp;&gt; \/dev\/null\n    if [ <span class=\"katex math inline\">? -ne 0 ]; then\n        err \"{ \\\"status\\\": \\\"Failure\\\", \\\"message\\\": \\\"Failed to mount<\/span>{NFS_SERVER}:<span class=\"katex math inline\">{SHARE} at<\/span>{MNTPATH}\\\"}\"\n        exit 1\n    fi\n    log '{\"status\": \"Success\"}'\n    exit 0\n}\n\nunmount() {\n    MNTPATH=<span class=\"katex math inline\">1\n    if [<\/span>(ismounted) -eq 0 ] ; then\n        log '{\"status\": \"Success\"}'\n        exit 0\n    fi\n\n    umount <span class=\"katex math inline\">{MNTPATH} &amp;&gt; \/dev\/null\n    if [<\/span>? -ne 0 ]; then\n        err \"{ \\\"status\\\": \\\"Failed\\\", \\\"message\\\": \\\"Failed to unmount volume at <span class=\"katex math inline\">{MNTPATH}\\\"}\"\n        exit 1\n    fi\n\n    log '{\"status\": \"Success\"}'\n    exit 0\n}\n\nop=<\/span>1\n\nif ! command -v jq &gt;\/dev\/null 2&gt;&amp;1; then\n    err \"{ \\\"status\\\": \\\"Failure\\\", \\\"message\\\": \\\"'jq' binary not found. Please install jq package before using this driver\\\"}\"\n    exit 1\nfi\n\nif [ \"<span class=\"katex math inline\">op\" = \"init\" ]; then\n    log '{\"status\": \"Success\", \"capabilities\": {\"attach\": false}}'\n    exit 0\nfi\n\nif [<\/span># -lt 2 ]; then\n    usage\nfi\n\nshift\n\ncase \"<span class=\"katex math inline\">op\" in\n    mount)\n        domount<\/span>*\n        ;;\n    unmount)\n        unmount $*\n        ;;\n    *)\n        log '{\"status\": \"Not supported\"}'\n        exit 0\nesac\n\nexit 1\n<\/code><\/pre>\n<p>\u5176\u5b9e\u5c31\u662f\u4e00\u6bb5 shell \u811a\u672c\uff0c\u652f\u6301\u4e09\u4e2a\u547d\u4ee4: init\u3001mount\u3001unmount\u3002\u5f53\u6211\u4eec\u5728\u96c6\u7fa4\u4e2d\u4e3a\u67d0\u4e2a pod \u6302\u8f7d FlexVolume\u65f6\uff0c\u8be5 pod \u6240\u5728\u8282\u70b9\u7684 kubelet \u4f1a\u8c03\u7528\u5176\u6307\u5b9a\u7684\u63d2\u4ef6\u811a\u672c\u6267\u884c mount \u547d\u4ee4\uff0c\u7136\u540e\u6302\u8f7d\u7ed9 pod \u4f7f\u7528\u3002\u5f53\u7136\u4e86\uff0cFlexVolume \u8fd8\u652f\u6301\u66f4\u590d\u6742\u7684\u63d2\u4ef6\u3002\u8fd9\u4e2a\u53ef\u4ee5\u770b\u5b98\u65b9\u7684\u6587\u6863: <a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/kubernetes\/community\/blob\/master\/contributors\/devel\/sig-storage\/flexvolume.md\">flexvolume<\/a><\/p>\n<h2>\u90e8\u7f72\u65b9\u6848<\/h2>\n<p>\u5173\u4e8e\u5982\u4f55\u90e8\u7f72 FlexVolume \u7684\u63d2\u4ef6\uff0c\u5176\u5b9e\u5728\u4f8b\u5b50\u4e2d\u4e5f\u6709\u63d0\u5230\uff0c\u8fd9\u91cc\u53ef\u4ee5\u603b\u7ed3\u4e00\u4e0b\uff1a<\/p>\n<ul>\n<li>\n<p>\u624b\u52a8\u90e8\u7f72\u5230\u6bcf\u4e2a\u8282\u70b9\u7684\u6307\u5b9a\u76ee\u5f55\u4e0b\uff0c\u6bd4\u5982\u6211\u4eec\u521a\u521a\u90e8\u7f72\u7684 nfs \uff0c\u5176\u5b9e\u9645\u8def\u5f84\u662f: <code>\/usr\/libexec\/kubernetes\/kubelet-plugins\/volume\/exec\/k8s~nfs<\/code>\u3002\u5176\u4e2d <code>\/usr\/libexec\/kubernetes\/kubelet-plugins\/volume\/exec<\/code> \u662f\u9ed8\u8ba4\u8def\u5f84\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7 kubelet \u7684\u53c2\u6570 <code>--volume-plugin-dir<\/code> \u548c controller manager \u7684\u53c2\u6570 <code>--flex-volume-plugin-dir<\/code> \u6765\u6307\u5b9a\u3002<code>k8s~nfs<\/code> \u8fd9\u4e2a\u8def\u5f84\u4e2d\uff0c<code>k8s<\/code> \u662f\u4f9b\u5e94\u5546\uff0c <code>nfs<\/code> \u662f\u9a71\u52a8\u540d\u79f0\uff0c\u5728\u4f7f\u7528\u7684\u65f6\u5019\u53ef\u4ee5\u8fd9\u6837\u6307\u5b9a: `driver: &#8220;k8s\/nfs&#8221;\u3002<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528 kubernetes \u7684 deamonset \u914d\u5408 hostPath \u6765\u90e8\u7f72\uff0c\u56e0\u4e3a daemonset \u4f1a\u5728\u6bcf\u4e2a\u8282\u70b9\u4e0a\u90fd\u542f\u52a8 pod\uff0c\u7136\u540e\u901a\u8fc7 hostPath \u5c06\u63d2\u4ef6\u653e\u5728\u6307\u5b9a\u7684\u4f4d\u7f6e\u5373\u53ef\u3002kubernetes \u96c6\u7fa4\u4e2d master \u8282\u70b9\u53ef\u80fd\u88ab\u8bbe\u7f6e\u6210\u4e0d\u5141\u8bb8\u8c03\u5ea6\u3002\u8fd9\u79cd\u60c5\u51b5\u4e0b daemonset \u9ed8\u8ba4\u4e0d\u8c03\u5ea6\u5230 master \u8282\u70b9\u4e0a\uff0c\u53ef\u4ee5\u4f7f\u7528 tolerations \u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898. \u5177\u4f53\u53ef\u53c2\u8003: <a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/stackoverflow.com\/questions\/48495263\/scheduler-is-not-scheduling-pod-for-daemonset-in-master-node\">Scheduler is not scheduling Pod for DaemonSet in Master node<\/a><\/p>\n<\/li>\n<li>\n<p>\u5176\u5b9e\u9664\u4e86 kubelet \u8981\u8c03\u7528\u63d2\u4ef6\u4e4b\u5916\uff0ccontroller-manager \u4e5f\u8981\u8c03\u7528\u3002\u6bd4\u5982\u6267\u884c <code>init<\/code>, <code>attach<\/code>, <code>detach<\/code>, <code>waitforattach<\/code>, <code>isattached<\/code> \u7b49\u547d\u4ee4\u3002<\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u7b80\u4ecb kubernetes \u4f7f\u7528 volume \u6765\u6ee1\u8db3\u5b83\u7684\u5b58\u50a8\u9700\u6c42\uff0c\u5b83\u652f\u6301\u5f88\u591a\u7684\u5b58\u50a8\u7cfb\u7edf\uff0c\u6bd4\u5982 nfs\u3001 gl &hellip; <a href=\"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">kubernetes\u5b58\u50a8&#8211;FlexVolume<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":531,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[89],"tags":[105,104],"class_list":["post-530","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-k8s","tag-flexvolume","tag-k8s"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>kubernetes\u5b58\u50a8-FlexVolume - \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\/01\/16\/kubernetes-flexvolume\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"kubernetes\u5b58\u50a8-FlexVolume - \u4e00\u53ea\u5b89\u9759\u7684\u732b\" \/>\n<meta property=\"og:description\" content=\"\u7b80\u4ecb kubernetes \u4f7f\u7528 volume \u6765\u6ee1\u8db3\u5b83\u7684\u5b58\u50a8\u9700\u6c42\uff0c\u5b83\u652f\u6301\u5f88\u591a\u7684\u5b58\u50a8\u7cfb\u7edf\uff0c\u6bd4\u5982 nfs\u3001 gl &hellip; \u7ee7\u7eed\u9605\u8bfbkubernetes\u5b58\u50a8&#8211;FlexVolume\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/\" \/>\n<meta property=\"og:site_name\" content=\"\u4e00\u53ea\u5b89\u9759\u7684\u732b\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-16T13:06:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-05T13:35:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/01\/1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1600\" \/>\n\t<meta property=\"og:image:height\" content=\"900\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/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=\"3 \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\/01\/16\/kubernetes-flexvolume\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/\"},\"author\":{\"name\":\"jiangpengfei\",\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"headline\":\"kubernetes\u5b58\u50a8&#8211;FlexVolume\",\"datePublished\":\"2020-01-16T13:06:52+00:00\",\"dateModified\":\"2023-07-05T13:35:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/\"},\"wordCount\":89,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"image\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/01\/1.png\",\"keywords\":[\"flexvolume\",\"k8s\"],\"articleSection\":[\"k8s\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/\",\"url\":\"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/\",\"name\":\"kubernetes\u5b58\u50a8-FlexVolume - \u4e00\u53ea\u5b89\u9759\u7684\u732b\",\"isPartOf\":{\"@id\":\"https:\/\/www.myway5.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/01\/1.png\",\"datePublished\":\"2020-01-16T13:06:52+00:00\",\"dateModified\":\"2023-07-05T13:35:12+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/#primaryimage\",\"url\":\"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/01\/1.png\",\"contentUrl\":\"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/01\/1.png\",\"width\":1600,\"height\":900},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.myway5.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"kubernetes\u5b58\u50a8&#8211;FlexVolume\"}]},{\"@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":"kubernetes\u5b58\u50a8-FlexVolume - \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\/01\/16\/kubernetes-flexvolume\/","og_locale":"zh_CN","og_type":"article","og_title":"kubernetes\u5b58\u50a8-FlexVolume - \u4e00\u53ea\u5b89\u9759\u7684\u732b","og_description":"\u7b80\u4ecb kubernetes \u4f7f\u7528 volume \u6765\u6ee1\u8db3\u5b83\u7684\u5b58\u50a8\u9700\u6c42\uff0c\u5b83\u652f\u6301\u5f88\u591a\u7684\u5b58\u50a8\u7cfb\u7edf\uff0c\u6bd4\u5982 nfs\u3001 gl &hellip; \u7ee7\u7eed\u9605\u8bfbkubernetes\u5b58\u50a8&#8211;FlexVolume","og_url":"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/","og_site_name":"\u4e00\u53ea\u5b89\u9759\u7684\u732b","article_published_time":"2020-01-16T13:06:52+00:00","article_modified_time":"2023-07-05T13:35:12+00:00","og_image":[{"width":1600,"height":900,"url":"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/01\/1.png","type":"image\/png"}],"author":"jiangpengfei","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"jiangpengfei","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/#article","isPartOf":{"@id":"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/"},"author":{"name":"jiangpengfei","@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"headline":"kubernetes\u5b58\u50a8&#8211;FlexVolume","datePublished":"2020-01-16T13:06:52+00:00","dateModified":"2023-07-05T13:35:12+00:00","mainEntityOfPage":{"@id":"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/"},"wordCount":89,"commentCount":0,"publisher":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"image":{"@id":"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/#primaryimage"},"thumbnailUrl":"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/01\/1.png","keywords":["flexvolume","k8s"],"articleSection":["k8s"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/","url":"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/","name":"kubernetes\u5b58\u50a8-FlexVolume - \u4e00\u53ea\u5b89\u9759\u7684\u732b","isPartOf":{"@id":"https:\/\/www.myway5.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/#primaryimage"},"image":{"@id":"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/#primaryimage"},"thumbnailUrl":"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/01\/1.png","datePublished":"2020-01-16T13:06:52+00:00","dateModified":"2023-07-05T13:35:12+00:00","breadcrumb":{"@id":"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/#primaryimage","url":"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/01\/1.png","contentUrl":"https:\/\/www.myway5.com\/wp-content\/uploads\/2020\/01\/1.png","width":1600,"height":900},{"@type":"BreadcrumbList","@id":"https:\/\/www.myway5.com\/index.php\/2020\/01\/16\/kubernetes-flexvolume\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.myway5.com\/"},{"@type":"ListItem","position":2,"name":"kubernetes\u5b58\u50a8&#8211;FlexVolume"}]},{"@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":6034,"_links":{"self":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/530","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=530"}],"version-history":[{"count":2,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/530\/revisions"}],"predecessor-version":[{"id":1560,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/530\/revisions\/1560"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/media\/531"}],"wp:attachment":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/media?parent=530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/categories?post=530"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/tags?post=530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}