{"id":35506,"date":"2022-12-14T15:07:41","date_gmt":"2023-07-20T19:54:25","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/kubernetes%ef%bc%9akubernetes%e5%8d%b7%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7%e5%a3%b0%e6%98%8epvc%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7pv%e3%80%82\/"},"modified":"2024-04-29T05:15:41","modified_gmt":"2024-04-28T21:15:41","slug":"kubernetes%ef%bc%9akubernetes%e5%8d%b7%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7%e5%a3%b0%e6%98%8epvc%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7pv%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/kubernetes%ef%bc%9akubernetes%e5%8d%b7%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7%e5%a3%b0%e6%98%8epvc%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7pv%e3%80%82\/","title":{"rendered":"Kubernetes\uff1aKubernetes\u5377\u3001\u6301\u4e45\u5377\u58f0\u660e(PVC)\u3001\u6301\u4e45\u5377(PV)"},"content":{"rendered":"<p>\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u8bb2\u89e3Kubernetes\u5377\u7684\u9002\u7528\u573a\u666f\u548c\u9650\u5236\uff0c\u4ee5\u53ca\u5904\u7406Kubernetes\u4e2dPVC\u548cPV\u7684\u6b65\u9aa4\u6982\u89c8\u3002<\/p>\n<p>\u4f5c\u8005\uff1a\u963f\u91cc\u5df4\u5df4\u7684\u9ad8\u7ea7\u7814\u53d1\u5de5\u7a0b\u5e08\uff0c\u9ec4\u67ef\uff08Zhitian\uff09\u5148\u751f\u3002<\/p>\n<h1>1\uff09\u5377\u7684\u4ecb\u7ecd<\/h1>\n<h3>\u97f3\u9891\u5bb9\u91cf<\/h3>\n<p>Pod Volume\u5728\u4ee5\u4e0b\u60c5\u51b5\u4e0b\u88ab\u4f7f\u7528\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30b7\u30ca\u30ea\u30aa1\uff09Pod\u5185\u306e\u30b3\u30f3\u30c6\u30ca\u304c\u30af\u30e9\u30c3\u30b7\u30e5\u3057\u3001kubelet\u306b\u3088\u3063\u3066\u518d\u8d77\u52d5\u3055\u308c\u305f\u3068\u304d\u306b\u3001\u30b3\u30f3\u30c6\u30ca\u304c\u751f\u6210\u3057\u305f\u91cd\u8981\u306a\u30c7\u30fc\u30bf\u304c\u5931\u308f\u308c\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30b7\u30ca\u30ea\u30aa2\uff09Pod\u5185\u306e\u8907\u6570\u306e\u30b3\u30f3\u30c6\u30ca\u9593\u3067\u306e\u30c7\u30fc\u30bf\u5171\u6709\u3092\u78ba\u4fdd\u3059\u308b\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u3067\u306f\u3001\u4e00\u822c\u7684\u306aPod Volumes\u306e\u7a2e\u985e\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/ul>\n<p>1\uff09\u672c\u5730\u5b58\u50a8\uff1a\u53ef\u80fd\u5305\u542bemptydir\/hostpath\u3002<br \/>\n2\uff09\u7f51\u7edc\u5b58\u50a8\uff1a\u5206\u4e3a\u5185\u90e8\u5b9e\u73b0\u65b9\u5f0f\u548c\u5916\u90e8\u5b9e\u73b0\u65b9\u5f0f\u3002\u5185\u90e8\u5b9e\u73b0\u65b9\u5f0f\u5c06\u5b9e\u73b0\u4ee3\u7801\u5b58\u50a8\u5728Kubernetes\u7684\u4ee3\u7801\u5e93\u4e2d\u3002\u968f\u7740Kubernetes\u652f\u6301\u7684\u5b58\u50a8\u7c7b\u578b\u589e\u591a\uff0c\u8fd9\u79cd\u65b9\u5f0f\u4f1a\u4f7f\u5f97Kubernetes\u7684\u7ef4\u62a4\u548c\u5f00\u53d1\u53d8\u5f97\u56f0\u96be\u3002\u5916\u90e8\u5b9e\u73b0\u65b9\u5f0f\u5219\u5c06\u4e0d\u540c\u5b58\u50a8\u8bbe\u5907\u7684\u9a71\u52a8\u7a0b\u5e8f\u4eceKubernetes\u4ee3\u7801\u5e93\u4e2d\u79fb\u9664\uff0c\u5e76\u4f7f\u7528\u62bd\u8c61API\u3002\u56e0\u6b64\uff0c\u5728\u5b9e\u73b0\u7f51\u7edc\u5b58\u50a8\u63d2\u4ef6\u65f6\uff0c\u63a8\u8350\u4f7f\u7528\u5916\u90e8\u5b9e\u73b0\u65b9\u5f0f\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u7406\u89e3\u4ee5\u4e0b\u97f3\u91cf\u7684\u6982\u5ff5\u662f\u5f88\u91cd\u8981\u7684\u3002<\/p>\n<p>1\uff09\u9884\u6d4b\u7684\u5377\uff1a\u90e8\u5206\u914d\u7f6e\u5982secret\/configmap\u901a\u8fc7\u5377\u6302\u8f7d\u5230\u5bb9\u5668\u4e2d\uff0c\u5bb9\u5668\u5185\u7684\u7a0b\u5e8f\u901a\u8fc7POSIX\uff08\u53ef\u79fb\u690d\u64cd\u4f5c\u7cfb\u7edf\u63a5\u53e3\uff09\u8bbf\u95ee\u914d\u7f6e\u3002<br \/>\n2\uff09\u6301\u4e45\u5377\uff08PVs\uff09\u548c\u6301\u4e45\u5377\u58f0\u660e\uff08PVCs\uff09\uff1a\u672c\u6587\u91cd\u70b9\u4ecb\u7ecd\u4e86\u8fd9\u4e9b\u5377\uff0c\u5e76\u5728\u4ee5\u4e0b\u7ae0\u8282\u8fdb\u884c\u89e3\u91ca\u3002<\/p>\n<h3>\u89c6\u9891<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/10-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5728\u53ef\u7528Pod Volume\u60c5\u51b5\u4e0b\uff0c\u7406\u89e3\u5f15\u5165PV\u7684\u5fc5\u8981\u6027\u975e\u5e38\u91cd\u8981\u3002\u58f0\u660e\u4e3aPod\u7684Volume\u7684\u751f\u547d\u5468\u671f\u548cPod\u7684\u751f\u547d\u5468\u671f\u76f8\u540c\u3002\u901a\u5e38\u60c5\u51b5\u5982\u4e0b\uff1a<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30b7\u30ca\u30ea\u30aa1\uff1a\u30a4\u30e1\u30fc\u30b8\u306e\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u4e2d\u306bDeployment\u3067\u7ba1\u7406\u3055\u308c\u3066\u3044\u308bPod\u304c\u524a\u9664\u3055\u308c\u3001\u518d\u4f5c\u6210\u3055\u308c\u305f\u5834\u5408\u3001\u65b0\u3057\u3044Pod\u306f\u53e4\u3044Pod\u306e\u30c7\u30fc\u30bf\u3092\u518d\u5229\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30b7\u30ca\u30ea\u30aa2\uff1a\u30db\u30b9\u30c8\u304c\u5fdc\u7b54\u3057\u306a\u304f\u306a\u3063\u305f\u3068\u304d\u3001Pod\u3092\u30db\u30b9\u30c8\u304b\u3089\u79fb\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002StatefulSet\u3067\u7ba1\u7406\u3055\u308c\u3066\u3044\u308bPod\u306b\u306f\u3001Pod\u30dc\u30ea\u30e5\u30fc\u30e0\u3067\u306f\u5b9f\u73fe\u3067\u304d\u306a\u3044\u30dc\u30ea\u30e5\u30fc\u30e0\u30d9\u30fc\u30b9\u306e\u79fb\u884c\u306e\u30bb\u30de\u30f3\u30c6\u30a3\u30af\u30b9\u304c\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30b7\u30ca\u30ea\u30aa3\uff1aPod\u9593\u306e\u30c7\u30fc\u30bf\u5171\u6709\u3092\u5ba3\u8a00\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002Pod Volume\u306f\u3001Pod\u5185\u306e\u8907\u6570\u306e\u30b3\u30f3\u30c6\u30ca\u9593\u3067\u30c7\u30fc\u30bf\u3092\u5171\u6709\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u3057\u304b\u3057\u3001Pod Volume\u306f\u3001\u8907\u6570\u306ePod\u9593\u306e\u30c7\u30fc\u30bf\u5171\u6709\u306b\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u30b7\u30ca\u30ea\u30aa4\uff1a\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306e\u8ffd\u52a0\u3084\u30ea\u30b5\u30a4\u30ba\u6a5f\u80fd\u306a\u3069\u3001\u30dc\u30ea\u30e5\u30fc\u30e0\u306e\u6a5f\u80fd\u3092\u62e1\u5f35\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/ul>\n<p>\u5728\u524d\u9762\u7684\u65b9\u6848\u4e2d\uff0c\u5f88\u96be\u51c6\u786e\u5730\u901a\u8fc7Pod Volume\u6765\u8868\u793a\u91cd\u7528\u548c\u5171\u4eab\u7684\u8bed\u4e49\uff0c\u5e76\u4e14\u96be\u4ee5\u6269\u5c55\u529f\u80fd\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u5c06\u5b58\u50a8\u548c\u8ba1\u7b97\u5206\u79bb\uff0c\u5e76\u901a\u8fc7\u4e0d\u540c\u7684\u7ec4\u4ef6\u6765\u7ba1\u7406\u5b58\u50a8\u8d44\u6e90\u548c\u8ba1\u7b97\u8d44\u6e90\uff0c\u5c06Pod\u7684\u751f\u547d\u5468\u671f\u548c\u5377\u7684\u751f\u547d\u5468\u671f\u5206\u79bb\uff0c\u5c06PV\u5f15\u5165Kubernetes\u3002\u8fd9\u6837\uff0c\u5373\u4f7fPod\u88ab\u5220\u9664\uff0c\u5176PV\u4f9d\u7136\u5b58\u5728\u5e76\u53ef\u4ee5\u5728\u65b0\u7684Pod\u4e2d\u91cd\u65b0\u4f7f\u7528\u3002<\/p>\n<h3>PVC\u8bbe\u8ba1<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/15-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u4f7f\u7528PV\u5176\u5b9e\u662f\u5728\u4f7f\u7528PVC\u3002\u90a3\u4e48\u65e2\u7136\u53ef\u4ee5\u4f7f\u7528PV\uff0c\u4e3a\u4ec0\u4e48\u8fd8\u9700\u8981\u8bbe\u8ba1PVC\u5462\uff1fPVC\u7684\u8bbe\u8ba1\u662f\u4e3a\u4e86\u7b80\u5316Kubernetes\u7528\u6237\u7684\u5b58\u50a8\u4f7f\u7528\uff0c\u5e76\u5c06\u7528\u6237\u7684\u5b58\u50a8\u9700\u6c42\u4e0e\u5b9e\u73b0\u7ec6\u8282\u5206\u79bb\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u5728\u4f7f\u7528\u5b58\u50a8\u65f6\uff0c\u53ea\u9700\u58f0\u660e\u6240\u9700\u7684\u5b58\u50a8\u5927\u5c0f\u548c\u8bbf\u95ee\u6a21\u5f0f\u5373\u53ef\u3002<\/p>\n<p>\u8bbf\u95ee\u6a21\u5f0f\u662f\u6307\u6240\u4f7f\u7528\u7684\u5b58\u50a8\u662f\u5728\u591a\u4e2a\u8282\u70b9\uff08\u800c\u4e0d\u662fPod\uff09\u4e2d\u5171\u4eab\uff0c\u8fd8\u662f\u5728\u5355\u4e2a\u8282\u70b9\uff08\u800c\u4e0d\u662fPod\uff09\u4e2d\u72ec\u5360\u8bbf\u95ee\u3002\u6b64\u5916\uff0c\u8fd8\u9700\u8981\u6307\u660e\u6240\u4f7f\u7528\u7684\u5b58\u50a8\u662f\u53ea\u652f\u6301\u8bfb\u53d6\u8bbf\u95ee\uff0c\u8fd8\u662f\u540c\u65f6\u652f\u6301\u8bfb\u53d6\u548c\u5199\u5165\u3002\u8fd9\u662f\u552f\u4e00\u7684\u5173\u6ce8\u70b9\u3002<\/p>\n<p>PVC\u548cPV\u5c06\u9700\u6c42\u548c\u5b9e\u73b0\u7ec6\u8282\u5206\u79bb\u3002\u4f7f\u7528PVC\u58f0\u660e\u5b58\u50a8\u8981\u6c42\u3002\u901a\u8fc7\u96c6\u7fa4\u7ba1\u7406\u5458\u548c\u5b58\u50a8\u56e2\u961f\u7edf\u4e00\u7ba1\u7406PV\uff0c\u7b80\u5316\u5b58\u50a8\u4f7f\u7528\u3002PV\u548cPVC\u7684\u8bbe\u8ba1\u7c7b\u4f3c\u4e8e\u9762\u5411\u5bf9\u8c61\u7684API\u548c\u5b9e\u73b0\u7684\u5173\u7cfb\uff0c\u4f7f\u7528\u51fd\u6570\u65f6\u65e0\u9700\u4e86\u89e3\u5b9e\u73b0\u7ec6\u8282\uff0c\u53ea\u9700\u5173\u6ce8API\u5373\u53ef\u3002<\/p>\n<p>\u5728\u63a5\u4e0b\u6765\u7684\u90e8\u5206\u4e2d\uff0c\u6211\u4eec\u5c06\u8ba8\u8bbaPV\u662f\u5982\u4f55\u751f\u6210\u7684\u3002<\/p>\n<h3>\u9759\u6001\u5bb9\u91cf\u5206\u914d<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/21-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5728\u8fd9\u4e2a\u6a21\u5f0f\u4e0b\uff0c\u96c6\u7fa4\u7ba1\u7406\u5458\u4f1a\u89c4\u5212\u96c6\u7fa4\u7528\u6237\u5982\u4f55\u4f7f\u7528\u5b58\u50a8\u3002\u9884\u5148\u521b\u5efa\u4e86\u4e00\u4e9b\u6c38\u4e45\u5377\uff08PV\uff09\u3002\u7528\u6237\u63d0\u4ea4PVC\u540e\uff0cKubernetes\u7684\u7ec4\u4ef6\u4f1a\u534f\u52a9\u5c06PVC\u548cPV\u8fdb\u884c\u5339\u914d\u3002\u5f53\u7528\u6237\u9700\u8981\u901a\u8fc7Pod\u4f7f\u7528\u5b58\u50a8\u65f6\uff0c\u7528\u6237\u53ef\u4ee5\u6839\u636ePVC\u627e\u5230\u76f8\u5e94\u7684PV\u5e76\u4f7f\u7528\u5b83\u4eec\u3002<\/p>\n<p>\u9759\u6001\u5377\u4e88\u914d\u7684\u7f3a\u70b9\u662f\u4ec0\u4e48\uff1f\u96c6\u7fa4\u7ba1\u7406\u5458\u9700\u8981\u9884\u5148\u521b\u5efa\u6301\u4e45\u5377(PV)\uff0c\u7136\u800c\u9884\u6d4b\u7528\u6237\u5b9e\u9645\u9700\u6c42\u662f\u56f0\u96be\u7684\u3002\u4f8b\u5982\uff0c\u5373\u4f7f\u7528\u6237\u9700\u8981\u4e00\u4e2a20GB\u7684PV\uff0c\u4f46\u96c6\u7fa4\u7ba1\u7406\u5458\u9884\u5148\u521b\u5efa\u4e8680GB\u6216100GB\u7684PV\uff0c\u8fd9\u4e9b\u5377\u5c06\u6210\u4e3a\u8d44\u6e90\u7684\u6d6a\u8d39\uff0c\u5e76\u4e14\u65e0\u6cd5\u6ee1\u8db3\u7528\u6237\u7684\u5b9e\u9645\u9700\u6c42\u3002<\/p>\n<h3>\u97f3\u91cf\u7684\u52a8\u6001\u5206\u914d<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/25-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5728\u8fd9\u79cd\u6a21\u5f0f\u4e0b\uff0c\u96c6\u7fa4\u7ba1\u7406\u5458\u65e0\u9700\u9884\u5148\u521b\u5efa\u6c38\u4e45\u5377\uff08PV\uff09\u3002\u76f8\u53cd\uff0c\u96c6\u7fa4\u7ba1\u7406\u5458\u9700\u8981\u521b\u5efa\u5305\u542b\u7279\u5b9a\u7c7b\u578b\u5b58\u50a8\u8bbe\u5907\u6240\u9700\u53c2\u6570\u7684\u6a21\u677f\u6587\u4ef6\uff0c\u5982\u5757\u5b58\u50a8\u6216\u7f51\u7edc\u9644\u52a0\u5b58\u50a8\uff08NAS\uff09\u3002\u8fd9\u4e9b\u53c2\u6570\u4e0e\u5b58\u50a8\u5b9e\u65bd\u76f8\u5173\uff0c\u4f46\u4e0e\u7528\u6237\u65e0\u5173\u3002\u7528\u6237\u6240\u9700\u8981\u505a\u7684\u5c31\u662f\u63d0\u4ea4\u6301\u4e45\u5377\u58f0\u660e\uff08PVC\uff09\u5e76\u6307\u5b9a\u8981\u4f7f\u7528\u7684\u5b58\u50a8\u6a21\u677f\uff08StorageClass\uff09\u3002<\/p>\n<p>Kubernetes\u96c6\u7fa4\u4e2d\u7684\u63a7\u5236\u7ec4\u4ef6\u6839\u636ePVC\u548cStorageClass\u7684\u52a8\u6001\u4fe1\u606f\u751f\u6210\u7528\u6237\u6240\u9700\u7684\u5b58\u50a8\u8bbe\u5907\uff08PV\uff09\u3002\u5728PVC\u548cPV\u7ed1\u5b9a\u540e\uff0cPod\u53ef\u4ee5\u4f7f\u7528PV\u3002\u63a7\u5236\u7ec4\u4ef6\u901a\u8fc7\u751f\u6210\u5b58\u50a8\u6240\u9700\u7684\u5b58\u50a8\u6a21\u677f\uff08StorageClass\uff09\u5e76\u6839\u636e\u7528\u6237\u9700\u6c42\u52a8\u6001\u521b\u5efaPV\uff0c\u5b9e\u73b0\u6309\u9700\u5206\u914d\u3002\u8fd9\u6837\u4e00\u6765\uff0c\u53ef\u4ee5\u51cf\u8f7b\u96c6\u7fa4\u7ba1\u7406\u5458\u7684\u8fd0\u7ef4\u5de5\u4f5c\uff0c\u540c\u65f6\u4e0d\u589e\u52a0\u7528\u6237\u7684\u4f7f\u7528\u96be\u5ea6\u3002<\/p>\n<h1>\u4f7f\u7528\u6837\u4f8b<\/h1>\n<p>\u8fd9\u91cc\u5c06\u5bf9Pod Volume\u3001PV\u3001PVC\u3001StorageClass\u7684\u4f7f\u7528\u65b9\u6cd5\u8fdb\u884c\u89e3\u91ca\u3002<\/p>\n<h3>Pod Volumes\u7684\u4f7f\u7528\u65b9\u5f0f<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/31-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u6839\u636e\u5de6\u4fa7\u7684\u56fe\u8868\uff0c\u6211\u4eec\u5728Pod\u7684YAML\u6587\u4ef6\u4e2d\u7684&#8221;volume&#8221;\u5b57\u6bb5\u4e2d\u58f0\u660e\u4e86\u4e00\u4e2a\u5377\u7684\u540d\u79f0\u548c\u7c7b\u578b\u3002\u4e00\u4e2a\u5377\u662femptyDir\u7c7b\u578b\uff0c\u53e6\u4e00\u4e2a\u662fhostPath\u7c7b\u578b\u3002\u5b83\u4eec\u90fd\u662f\u672c\u5730\u5377\u3002\u5377\u4f1a\u5728\u5bb9\u5668\u5185\u90e8\u4f7f\u7528\uff0c\u6839\u636e&#8221;volumeMounts&#8221;\u5b57\u6bb5\u8fdb\u884c\u6302\u8f7d\u3002&#8221;volumeMounts&#8221;\u6307\u5b9a\u7684&#8221;name&#8221;\u8868\u793a\u8981\u4f7f\u7528\u7684\u5377\u7684\u540d\u79f0\uff0c&#8221;mountPath&#8221;\u8868\u793a\u5bb9\u5668\u5185\u7684\u6302\u8f7d\u76ee\u5f55\u3002<\/p>\n<p>\u8fd8\u6709\u4e00\u4e2a&#8221;subPath&#8221;\u5b57\u6bb5\u3002<\/p>\n<p>\u65e0\u8bba\u54ea\u4e2a\u5bb9\u5668,\u90fd\u4f7f\u7528\u540d\u4e3a&#8221;cache-volume&#8221;\u7684\u76f8\u540c\u5377\uff0c\u5e76\u4e14\u5f53\u591a\u4e2a\u5bb9\u5668\u5171\u4eab\u76f8\u540c\u5377\u65f6\uff0c\u4f7f\u7528&#8221;subPath&#8221;\u6765\u5206\u79bb\u6570\u636e\u3002\u8fd9\u6837\u4e00\u6765\uff0c\u5728\u5377\u5185\u4f1a\u521b\u5efa\u4e24\u4e2a\u5b50\u76ee\u5f55\u3002\u5bb9\u56681\u5199\u5165\u7f13\u5b58\u7684\u6570\u636e\u5b9e\u9645\u4e0a\u4f1a\u88ab\u5199\u5165cache1\u5b50\u76ee\u5f55\u4e2d\uff0c\u5bb9\u56682\u5199\u5165\u7684\u6570\u636e\u5219\u4f1a\u88ab\u5199\u5165cache2\u5b50\u76ee\u5f55\u4e2d\u3002<\/p>\n<p>\u300creadOnly\u300d\u5b57\u6bb5\u5c06\u7981\u6b62\u5411\u6302\u8f7d\u70b9\u5199\u5165\u6570\u636e\u3002<\/p>\n<p>\u8bf7\u95ee\uff0cemptyDir\u548chostPath\u6709\u4ec0\u4e48\u533a\u522b\u5462\uff1femptyDir\u662f\u5728\u521b\u5efaPod\u65f6\u4e34\u65f6\u521b\u5efa\u7684\u76ee\u5f55\u3002\u5f53Pod\u88ab\u5220\u9664\u65f6\uff0c\u76ee\u5f55\u548c\u5176\u4e2d\u7684\u6570\u636e\u4e5f\u4f1a\u88ab\u5220\u9664\u3002\u800chostPath\u662f\u4e3b\u673a\u4e0a\u7684\u76ee\u5f55\uff0c\u5373\u4f7fPod\u88ab\u5220\u9664\uff0c\u76ee\u5f55\u548c\u5176\u4e2d\u7684\u6570\u636e\u4ecd\u7136\u5b58\u5728\u3002<\/p>\n<h3>\u9759\u6001PV\u7684\u4f7f\u7528\u65b9\u5f0f<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/38-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u9759\u6001PV\u7531\u7ba1\u7406\u5458\u521b\u5efa\u3002\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u4ee5NAS\uff08\u7f51\u7edc\u9644\u52a0\u5b58\u50a8\uff09\u4e3a\u4f8b\u3002\u5728\u963f\u91cc\u4e91NAS\u63a7\u5236\u53f0\u4e0a\u521b\u5efaNAS\uff0c\u5e76\u5c06NAS\u4fe1\u606f\u6dfb\u52a0\u5230PV\u5bf9\u8c61\u4e2d\u3002\u4e00\u65e6\u9884\u5148\u521b\u5efa\u4e86PV\u5bf9\u8c61\uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528PVC\u58f0\u660e\u5b58\u50a8\u9700\u6c42\u5e76\u521b\u5efaPod\u3002\u8981\u521b\u5efaPod\uff0c\u9700\u8981\u5c06\u5b58\u50a8\u6302\u8f7d\u5230\u5bb9\u5668\u7684\u6302\u8f7d\u70b9\uff0c\u6839\u636e\u4e0a\u8ff0\u5b57\u6bb5\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n<p>\u4e3a\u4e86\u5199\u5165YAML\u6587\u4ef6\uff0c\u96c6\u7fa4\u7ba1\u7406\u5458\u53ef\u4ee5\u5728\u4e91\u5b58\u50a8\u4f9b\u5e94\u5546\u7aef\u521b\u5efaPV\u5e76\u6dfb\u52a0\u76f8\u5173\u7684\u4fe1\u606f\u5230PV\u5bf9\u8c61\u4e2d\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/41-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u8bf7\u6ce8\u610f\u4f5c\u6210\u7684NAS\u5bf9\u5e94\u7684\u4e00\u4e9b\u91cd\u8981\u5b57\u6bb5\u3002&#8221;capacity&#8221;\u5b57\u6bb5\u8868\u793a\u521b\u5efa\u7684\u5b58\u50a8\u7684\u5927\u5c0f\uff0c&#8221;accessModes&#8221;\u5b57\u6bb5\u8868\u793a\u521b\u5efa\u7684\u5b58\u50a8\u7684\u8bbf\u95ee\u6a21\u5f0f\u3002<\/p>\n<p>\u300cPersistentVolumeReclaimPolicy\u300d\u5b57\u6bb5\u8868\u793aPV\u7684\u56de\u6536\u7b56\u7565\u3002\u6362\u53e5\u8bdd\u8bf4\uff0c\u5b83\u6307\u5b9a\u4e86\u5728\u5220\u9664\u4f7f\u7528PV\u7684Pod\u548cPVC\u4e4b\u540e\uff0c\u662f\u5220\u9664PV\u8fd8\u662f\u4fdd\u7559PV\u3002<\/p>\n<p>\u5728\u4f7f\u7528\u5b58\u50a8\u4e4b\u524d\uff0c\u8bf7\u521b\u5efa PVC \u5bf9\u8c61\u3002\u6b64\u5bf9\u8c61\u4ec5\u9700\u6307\u5b9a\u5b58\u50a8\u9700\u6c42\uff0c\u65e0\u9700\u6307\u5b9a\u5b58\u50a8\u5b9e\u73b0\u7684\u8be6\u7ec6\u4fe1\u606f\u3002\u5b58\u50a8\u9700\u6c42\u5305\u62ec\u6240\u9700\u5b58\u50a8\u7684\u5927\u5c0f &#8220;resources.requests.storage&#8221; \u548c\u5b58\u50a8\u8bbf\u95ee\u6a21\u5f0f &#8220;accessModes&#8221;\u3002\u8bbf\u95ee\u6a21\u5f0f\u58f0\u660e\u4e3a &#8220;ReadWriteMany&#8221;\uff0c\u8868\u793a\u652f\u6301\u5bf9\u591a\u4e2a\u8282\u70b9\u5177\u6709\u8bfb\u5199\u6743\u9650\u7684\u8bbf\u95ee\uff0c\u8fd9\u662f NAS \u7684\u5178\u578b\u529f\u80fd\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/45-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5728\u524d\u9762\u7684\u56fe\u4e2d\u6240\u5c55\u793a\u7684\u5927\u5c0f\u548c\u8bbf\u95ee\u6a21\u5f0f\u4e0e\u521b\u5efa\u7684\u9759\u6001PV\u5339\u914d\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5728\u63d0\u4ea4PVC\u65f6\uff0cKubernetes\u96c6\u7fa4\u7ec4\u4ef6\u5c06\u7ed1\u5b9aPV\u548cPVC\u3002\u7136\u540e\uff0c\u5728\u63d0\u4ea4Pod\u7684YAML\u6587\u4ef6\u65f6\uff0c\u5c06claimName\u8bbe\u7f6e\u4e3a\u5377\uff0c\u5e76\u58f0\u660e\u6240\u9700\u7684PVC\u3002\u6302\u8f7d\u65b9\u6cd5\u4e0e\u524d\u9762\u7684\u76f8\u540c\u3002\u63d0\u4ea4YAML\u6587\u4ef6\u540e\uff0c\u5c06\u627e\u5230\u57fa\u4e8ePVC\u7ed1\u5b9a\u7684PV\uff0c\u5e76\u53ef\u7528\u4e8e\u4f7f\u7528\u5b58\u50a8\u3002\u4ee5\u4e0a\u5c31\u662fPV\u5728\u9759\u6001\u9884\u914d\u7684\u60c5\u51b5\u4e0b\u88ab\u521b\u5efa\uff0c\u5e76\u5728Pod\u4e2d\u4f7f\u7528\u7684\u673a\u5236\u3002<\/p>\n<h3>\u52a8\u6001\u5149\u4f0f\u7684\u4f7f\u7528\u65b9\u6cd5<\/h3>\n<p>\u5728\u52a8\u6001PV\u4e2d\uff0c\u7cfb\u7edf\u7ba1\u7406\u5458\u53ef\u4ee5\u521b\u5efa\u6a21\u677f\u6587\u4ef6\uff0c\u800c\u4e0d\u9700\u8981\u4e8b\u5148\u5206\u914dPV\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/49-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u6a21\u677f\u6587\u4ef6\u9700\u8981\u5728StorageClass\u4e2d\u8bbe\u7f6e\u91cd\u8981\u4fe1\u606f\uff0c\u4f8b\u5982\u63d0\u4f9b\u8005\u7b49\u3002\u63d0\u4f9b\u8005\u4f1a\u6307\u5b9a\u7528\u4e8e\u521b\u5efa\u6301\u4e45\u5377\u548c\u76f8\u5e94\u5b58\u50a8\u7684\u5b58\u50a8\u63d2\u4ef6\u3002<\/p>\n<p>\u521b\u5efa Kubernetes \u5b58\u50a8\u65f6\uff0c\u9700\u8981\u6307\u5b9a\u8fd9\u4e9b\u53c2\u6570\u3002\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u5ffd\u7565 regionld\u3001zoneld\u3001fsType\u3001type \u7b49\u53c2\u6570\u3002reclaimPolicy \u53c2\u6570\u7528\u4e8e\u8868\u793a\u52a8\u6001\u6301\u4e45\u5377\uff08PV\uff09\u548c\u6301\u4e45\u5377\u58f0\u660e\uff08PVC\uff09\u5728\u88ab\u5220\u9664\u540e\u7684\u5904\u7406\u65b9\u5f0f\uff0c&#8221;Delete&#8221; \u7684\u503c\u8868\u793a\u5f53 Pod \u548c PVC \u88ab\u5220\u9664\u65f6\uff0cPV \u4e5f\u4f1a\u88ab\u5220\u9664\u3002<\/p>\n<p>\u5728\u96c6\u7fa4\u7ba1\u7406\u5458\u63d0\u4ea4StorageClass\uff08PV\u521b\u5efa\u6a21\u677f\uff09\u540e\uff0c\u9996\u5148\u8981\u521b\u5efaPVC\u6587\u4ef6\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/53-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u4e0d\u4f1a\u66f4\u6539PVC\u6587\u4ef6\u7684\u5b58\u50a8\u5927\u5c0f\u548c\u8bbf\u95ee\u6a21\u5f0f\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u9700\u8981\u6dfb\u52a0StorageClassName\u5b57\u6bb5\uff0c\u5e76\u6307\u5b9a\u52a8\u6001PV\u6a21\u677f\u6587\u4ef6\u7684\u540d\u79f0\u3002\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u5c06StorageClassName\u8bbe\u7f6e\u4e3acsi-disk\u3002<\/p>\n<p>\u5f53PVC\u88ab\u63d0\u4ea4\u65f6\uff0cKubernetes\u96c6\u7fa4\u5185\u7684\u7ec4\u4ef6\u4f1a\u6839\u636ePVC\u548c\u5bf9\u5e94\u7684StorageClass\u52a8\u6001\u751f\u6210PV\uff0c\u5e76\u5c06PV\u4e0ePVC\u7ed1\u5b9a\u3002\u5728\u53d1\u9001YAML\u6587\u4ef6\u540e\uff0c\u6839\u636ePVC\u627e\u5230\u52a8\u6001PV\u5e76\u5c06\u5176\u6302\u8f7d\u5230\u76f8\u5e94\u7684\u5bb9\u5668\u4e0a\u3002<\/p>\n<h3>PV\u7684\u4e3b\u8981\u9886\u57df (PV zh\u012b<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/57-0.png\" alt=\"image.png\" \/><\/div>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Capacity:\u30b9\u30c8\u30ec\u30fc\u30b8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30b5\u30a4\u30ba\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">AccessModes:PV\u306e\u4f7f\u7528\u30e2\u30fc\u30c9\u3002PV\u306f3\u3064\u306e\u30e2\u30fc\u30c9\u3067\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/ul>\n<p>1) \u4e00\u6b21\u8b80\u5beb\uff1a\u55ae\u7bc0\u9ede\u7684\u8b80\u5beb\u6a21\u5f0f<br \/>\n2) \u50c5\u8b80\u591a\u4eba\uff1a\u591a\u7bc0\u9ede\u7684\u53ea\u8b80\u6a21\u5f0f\uff0c\u4e00\u822c\u7684\u6578\u64da\u5171\u4eab\u6a21\u5f0f<br \/>\n3) \u8b80\u5beb\u591a\u4eba\uff1a\u591a\u7bc0\u9ede\u7684\u8b80\u5beb\u5169\u7528\u6a21\u5f0f<\/p>\n<p>&#8220;Capacity&#8221; \u548c &#8220;AccessModes&#8221; \u662f\u63d0\u4ea4\u7684 PVC \u4e2d\u6700\u91cd\u8981\u7684\u5b57\u6bb5\u3002\u5f53 PVC \u88ab\u63d0\u4ea4\u540e\uff0cKubernetes \u96c6\u7fa4\u4e2d\u7684\u7ec4\u4ef6\u4f1a\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u627e\u5230\u5408\u9002\u7684 PV\u3002<\/p>\n<p>\u8fd9\u4e2a\u7ec4\u4ef6\u662f\u57fa\u4e8ePV\u521b\u5efa\u7684AccessModes\u7d22\u5f15\uff0c\u83b7\u53d6\u6ee1\u8db3\u7279\u5b9aPVC\u7684AccessModes\u5b57\u6bb5\u7684\u6240\u6709PV\u7684\u5217\u8868\uff0c\u5e76\u6839\u636ePVC\u7684Capacity\u3001StorageClassName\u548cLabel Selector\u7684\u503c\u5c06PV\u8fdb\u884c\u7b5b\u9009\u3002\u5982\u679c\u6709\u591a\u4e2aPV\u6ee1\u8db3\u6761\u4ef6\uff0c\u5219\u9009\u62e9\u5927\u5c0f\u6700\u77ed\u4e14\u8bbf\u95ee\u6a21\u5f0f\u5217\u8868\u6700\u77ed\u7684PV\u3002<\/p>\n<ul class=\"post-ul\">PersistentVolumeReclaimPolicy\uff1a\u7279\u5b9a\u306ePV\u306ePVC\u304c\u524a\u9664\u3055\u308c\u305f\u5f8c\u3001PV\u304c\u3069\u306e\u3088\u3046\u306b\u51e6\u7406\u3055\u308c\u308b\u304b\u3092\u6307\u5b9a\u3059\u308b\u30dd\u30ea\u30b7\u30fc\u3067\u3059\u3002PV \u306f 3 \u3064\u306e\u30e2\u30fc\u30c9\u3067\u51e6\u7406\u3055\u308c\u307e\u3059\u3002<\/ul>\n<p>1\uff09\u56de\u6536\u5229\u7528\uff1a(\u653e\u68c4)<br \/>\n2) \u522a\u9664\uff1a\u7576 PVC \u88ab\u522a\u9664\u6642\uff0cPV \u4e5f\u6703\u88ab\u522a\u9664\u3002<br \/>\n3) \u4fdd\u7559\uff1a\u5373\u4f7f PVC \u88ab\u522a\u9664\uff0cPV \u4ecd\u7136\u4fdd\u7559\u3002\u9019\u5c07\u7531\u7cfb\u7d71\u7ba1\u7406\u54e1\u8655\u7406\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">StorageClassName:\u30dc\u30ea\u30e5\u30fc\u30e0\u306e\u52d5\u7684\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0\u6642\u306bPV\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u540d\u524d\u3067\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">NodeAffinity:\u4f5c\u6210\u3055\u308c\u305fPV\u304c\u30de\u30a6\u30f3\u30c8\u3055\u308c\u308b\u30ce\u30fc\u30c9\u306e\u5236\u9650\u3067\u3059\u3002NodeAffinity \u306f\u3001PV \u3092\u4f7f\u7528\u3059\u308bPod\u3082\u5236\u9650\u3057\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001Pod\u306f\u3001PV \u3092\u4f7f\u7528\u3059\u308b\u30ce\u30fc\u30c9\u306b\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3055\u308c\u305f\u3068\u304d\u306b\u306e\u307f PV \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u3053\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u3064\u3044\u3066\u306f\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u30c8\u30dd\u30ed\u30b8\u30fc\u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u8aac\u660e\u3057\u307e\u3059\u3002<\/ul>\n<h3>PV\u72b6\u6001\u7684\u8f6c\u53d8 de<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/66-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5728PV\u5bf9\u8c61\u521b\u5efa\u4e4b\u540e\uff0c\u4f1a\u5904\u4e8e\u4fdd\u7559\u72b6\u6001\u4e00\u6bb5\u65f6\u95f4\u3002\u5b9e\u9645\u7684PV\u521b\u5efa\u5b8c\u6210\u540e\uff0c\u5c06\u53d8\u4e3a\u53ef\u7528\u72b6\u6001\u3002<\/p>\n<p>\u63d0\u4ea4 PVC \u540e\uff0c\u76f8\u5173\u7684 Kubernetes \u7ec4\u4ef6\u4f1a\u5c06 PV \u7ed1\u5b9a\u5230 PVC \u4e0a\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0cPV \u548c PVC \u90fd\u4f1a\u5904\u4e8e\u7ed1\u5b9a\u72b6\u6001\u3002\u5f53\u4f7f\u7528 PVC \u540e\uff0c\u5982\u679c\u5220\u9664 PVC\uff0c\u5219 PV \u5c06\u91ca\u653e\u5e76\u53d8\u4e3a\u53ef\u7528\u72b6\u6001\u3002\u6b64\u5916\uff0cPersistentVolumeReclaimPolicy \u5b57\u6bb5\u51b3\u5b9a\u662f\u5426\u5220\u9664\u6216\u4fdd\u7559 PV\u3002<\/p>\n<p>\u5f53PV\u88ab\u91ca\u653e\u540e\uff0c\u65e0\u6cd5\u76f4\u63a5\u6062\u590d\u4e3a\u53ef\u76f4\u63a5\u4f7f\u7528\u7684\u72b6\u6001\uff0c\u56e0\u6b64\u65e0\u6cd5\u7ed1\u5b9a\u5230\u65b0\u7684PVC\u4e0a\u3002\u8981\u91cd\u65b0\u4f7f\u7528\u88ab\u91ca\u653e\u7684PV\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4efb\u4f55\u4e00\u79cd\u65b9\u6cd5\u3002<\/p>\n<p>\u65b9\u6cd51: \u521b\u5efa\u4e00\u4e2aPV\u5bf9\u8c61\uff0c\u5e76\u5c06\u53d1\u5e03\u7684PV\u5b57\u6bb5\u4fe1\u606f\u6dfb\u52a0\u5230\u5176\u4e2d\uff0c\u5c06PV\u7ed1\u5b9a\u5230\u65b0\u7684PVC\u3002<br \/>\n\u65b9\u6cd52: \u5220\u9664Pod\uff0c\u4f46\u4fdd\u7559PVC\u5bf9\u8c61\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u4e0ePV\u7ed1\u5b9a\u7684PVC\u4ecd\u7136\u5b58\u5728\uff0cPod\u5c06\u76f4\u63a5\u91cd\u7528PV\u57fa\u4e8ePVC\u3002\u8fd9\u662fKubernetes\u4e2dStatefulSet\u7ba1\u7406\u7684\u57fa\u4e8e\u5377\u7684Pod\u8fc1\u79fb\u3002<\/p>\n<h1>3\uff09\u793a\u8303\u6f14\u793a<\/h1>\n<p>\u4e0b\u4e00\u6b65\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u5728\u5b9e\u9645\u73af\u5883\u4e2d\u8fdb\u884c\u9759\u6001\u5377\u914d\u7f6e\u548c\u52a8\u6001\u5377\u914d\u7f6e\u7684\u65b9\u6cd5\u3002<\/p>\n<h3>\u9759\u6001\u97f3\u91cf\u914d\u7f6e\u7684\u4f8b\u5b50<\/h3>\n<p>\u5728\u9759\u6001\u5377\u7684\u4f9b\u7ed9\u65b9\u9762\uff0c\u6211\u4eec\u4f7f\u7528\u963f\u91cc\u4e91\u7684NAS\u3002\u5728\u52a8\u6001\u5377\u7684\u4f9b\u7ed9\u65b9\u9762\uff0c\u6211\u4eec\u4f7f\u7528\u963f\u91cc\u4e91\u7684\u78c1\u76d8\u3002\u6211\u4eec\u5df2\u7ecf\u5c06\u5fc5\u8981\u7684\u5b58\u50a8\u63d2\u4ef6\u5982\u963f\u91cc\u4e91NAS\u7684csi-nasplugin\u548c\u963f\u91cc\u4e91\u78c1\u76d8\u7684csi-disk\u90e8\u7f72\u5230Kubernetes\u96c6\u7fa4\u4e2d\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/75-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u4e0b\u56fe\u662f\u4e00\u4e2a\u9759\u6001\u914d\u7f6e\u7684PV YAML\u6587\u4ef6\uff0c\u7528\u4e8e\u5bb9\u91cf\u914d\u7f6e\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/77-0.png\" alt=\"image.png\" \/><\/div>\n<p>volumeAttributes\u7528\u4e8e\u6307\u5b9a\u4e0e\u5df2\u5728\u963f\u91cc\u5df4\u5df4\u4e91NAS\u63a7\u5236\u53f0\u4e0a\u9884\u5148\u521b\u5efa\u7684NAS\u76f8\u5173\u7684\u4fe1\u606f\u3002\u5b58\u50a8\u5b57\u6bb5\u4e0b\u7684\u5bb9\u91cf\u4e3a5Gi\uff0c\u8bbf\u95ee\u6a21\u5f0f\u5b57\u6bb5\u4e3aReadWriteMany\uff0c\u6301\u4e45\u5377\u56de\u6536\u7b56\u7565\u4e3aRetain\uff0c\u8be5\u9a71\u52a8\u7a0b\u5e8f\u5728\u5377\u4e0a\u88ab\u4f7f\u7528\u3002<\/p>\n<p>\u6211\u5c06\u521b\u5efaPV\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/80-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5982\u4e0a\u56fe\u6240\u793a\uff0c\u592a\u9633\u80fd\u7535\u6c60\u5df2\u7ecf\u5904\u4e8e\u53ef\u5229\u7528\u72b6\u6001\u3002<\/p>\n<p>\u7136\u540e\uff0c\u521b\u5efanas-pvc\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/83-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u90a3\u4e48\uff0cPVC\u5df2\u7ecf\u88ab\u521b\u5efa\u5e76\u4e14\u5df2\u7ed1\u5b9a\u5230\u521b\u5efa\u7684PV\u4e0a\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/85-0.png\" alt=\"image.png\" \/><\/div>\n<p>PVC\u7684YAML\u6587\u4ef6\u4e2d\u8bb0\u5f55\u4e86\u6240\u9700\u7684\u5b58\u50a8\u5927\u5c0f\u548c\u8bbf\u95ee\u6a21\u5f0f\u3002\u5f53\u53d1\u9001PVC\u65f6\uff0c\u5b83\u5c06\u7ed1\u5b9a\u5230\u96c6\u7fa4\u4e2d\u5339\u914d\u7684PV\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a\u4f7f\u7528nas-fs\u7684Pod\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/88-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5982\u4e0a\u56fe\u6240\u793a\uff0c\u4e24\u4e2aPod\u6b63\u5728\u8fd0\u884c\u4e2d\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/90-0.png\" alt=\"image.png\" \/><\/div>\n<p>Pod\u7684YAML\u6587\u4ef6\u4e2d\u58f0\u660e\u4e86\u521b\u5efa\u7684PVC\u5bf9\u8c61\uff0c\u5e76\u5c06PVC\u5bf9\u8c61\u6302\u8f7d\u5230nas-container\u5bb9\u5668\u7684\/data\u76ee\u5f55\u3002\u901a\u8fc7\u201cDeployment\u201d\u521b\u5efa\u4e86Pod\u7684\u4e24\u4e2a\u526f\u672c\uff0c\u5e76\u901a\u8fc7\u53cd\u4eb2\u548c\u6027\u8c03\u5ea6\u5230\u4e0d\u540c\u7684\u8282\u70b9\u4e0a\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/92-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5728\u4e0a\u8ff0\u56fe\u4e2d\uff0c\u6709\u4e24\u4e2aPod\u88ab\u90e8\u7f72\u5728\u4e0d\u540c\u7684\u4e3b\u673a\u4e0a\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u5bf9\u4e2d\u6587\u7684\u540c\u4e49\u8f6c\u8ff0:<br \/>\n\u6309\u7167\u4e0b\u56fe\uff0c\u767b\u5f55\u5230\u7b2c\u4e00\u4e2a\u5bb9\u5668\u5e76\u6267\u884cfindmnt\u547d\u4ee4\u4ee5\u663e\u793a\u5176\u6302\u8f7d\u4fe1\u606f\u3002\u8bf7\u6ce8\u610f\u5b83\u88ab\u6302\u8f7d\u5230\u5df2\u58f0\u660e\u7684nas-fs\u3002\u63a5\u4e0b\u6765\uff0c\u5bf9test.test.test\u6587\u4ef6\u6267\u884ctouch\u547d\u4ee4\u3002\u7136\u540e\uff0c\u767b\u5f55\u5230\u53e6\u4e00\u4e2a\u5bb9\u5668\u5e76\u786e\u8ba4\u662f\u5426\u5df2\u5171\u4eab\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/95-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5b8c\u6210\u5f8c\uff0c\u518d\u6b21\u767b\u9304\u5230\u521d\u59cb\u5bb9\u5668\u4e2d\u3002<\/p>\n<p>\u6267\u884cfindmnt\u547d\u4ee4\uff0c\u786e\u8ba4\u4e24\u4e2aPod\u88ab\u8fdc\u7a0b\u6302\u8f7d\u5230\u540c\u4e00\u4e2a\u76ee\u5f55\uff0c\u4e5f\u5c31\u662f\u4f7f\u7528\u4e86\u76f8\u540c\u7684NAS PV\u3002\u901a\u8fc7\u4e24\u4e2aPod\u7684\u5b58\u5728\uff0c\u53ef\u4ee5\u786e\u5b9a\u8fd9\u4e24\u4e2aPod\u5728\u4e0d\u540c\u7684\u8282\u70b9\u4e0a\u8fd0\u884c\uff0c\u5e76\u4e14\u5171\u4eabNAS\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/98-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u8bf7\u5148\u5220\u9664 Pod\uff0c\u7136\u540e\u518d\u5220\u9664\u76f8\u5e94\u7684 PVC\u3002\u65e0\u6cd5\u5220\u9664\u6b63\u5728\u4f7f\u7528\u7684 PVC\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/100-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u50cf\u4e0b\u9762\u7684\u56fe\u4e00\u6837\uff0cPVC\u88ab\u79fb\u9664\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/102-0.png\" alt=\"image.png\" \/><\/div>\n<p>NAS\u7684PV\u5728\u53d1\u5e03\u72b6\u6001\u4e0b\u4ecd\u7136\u5b58\u5728\uff0c\u5e76\u4e14\u4f7f\u7528\u6b64PV\u7684PVC\u5df2\u88ab\u5220\u9664\uff0c\u8868\u660e\u5b83\u5df2\u88ab\u91ca\u653e\u3002\u7531\u4e8eRECLAIM POLICY\u8bbe\u7f6e\u4e3aRetain\uff0cPV\u5c06\u88ab\u4fdd\u7559\u3002<\/p>\n<h3>\u52a8\u6001\u914d\u7f6e\u7684\u4f8b\u5b50<\/h3>\n<p>\u624b\u52a8\u5220\u9664\u4fdd\u6301\u7684PV\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u96c6\u7fa4\u5185\u4e0d\u5b58\u5728PV\u3002<\/p>\n<p>\u521b\u5efa\u7528\u4e8e\u751f\u6210PV\u7684StorageClass\u6a21\u677f\u6587\u4ef6\uff0c\u5e76\u9a8c\u8bc1\u6587\u4ef6\u5185\u5bb9\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/107-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u6839\u636e\u4e0a\u8ff0\u56fe\u793a\uff0c\u6307\u5b9a\u4f7f\u7528\u7528\u4e8e\u521b\u5efa\u5b58\u50a8\u7684\u5377\u63d2\u4ef6\uff08\u7531\u963f\u91cc\u4e91\u56e2\u961f\u521b\u5efa\u7684\u963f\u91cc\u4e91\u78c1\u76d8\u63d2\u4ef6\uff09\u3002\u8bf7\u5ffd\u7565\u53c2\u6570\u90e8\u5206\uff0c\u5176\u5305\u542b\u4e86\u521b\u5efa\u5b58\u50a8\u6240\u9700\u7684\u53c2\u6570\u3002reclaimPolicy\u53c2\u6570\u88ab\u8bbe\u7f6e\u4e3aDelete\uff0c\u8868\u793a\u7531StorageClass\u521b\u5efa\u7684\u6301\u4e45\u5377\uff08PV\uff09\u5c06\u5728\u5176\u7ed1\u5b9a\u7684\u6301\u4e45\u5377\u58f0\u660e\uff08PVC\uff09\u88ab\u5220\u9664\u540e\u4e5f\u88ab\u5220\u9664\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/109-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5982\u4e0a\u56fe\u6240\u793a\uff0c\u96c6\u7fa4\u4e2d\u4e0d\u5305\u542bPV\u3002\u5c06\u63d0\u4ea4PVC\u6587\u4ef6\u3002\u5728PVC\u6587\u4ef6\u4e2d\uff0caccessModes\u4e3aReadWriteOnce\uff08\u963f\u91cc\u4e91\u7684\u78c1\u76d8\u4ec5\u652f\u6301\u5355\u8282\u70b9\u8bfb\u5199\u6a21\u5f0f\uff09\uff0c\u5b58\u50a8\u5bb9\u91cf\u4e3a30Gi\uff0cStorageClassName\u4e3a\u4e4b\u524d\u521b\u5efa\u7684csi-disk StorageClass\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/111-0.png\" alt=\"image.png\" \/><\/div>\n<p>PVC\u4fdd\u6301\u4e2d\uff0c\u8868\u793a\u76f8\u5e94\u7684PV\u6b63\u5728\u521b\u5efa\u4e2d\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/113-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u8bf7\u786e\u8ba4\u4e00\u6bb5\u65f6\u95f4\u540e\u751f\u6210\u4e86\u65b0\u7684PV\u3002\u8fd9\u4e2aPV\u662f\u57fa\u4e8e\u63d0\u4f9b\u7684PVC\u548cPVC\u6307\u5b9a\u7684\u5b58\u50a8\u7c7b\u52a8\u6001\u751f\u6210\u7684\u3002\u7136\u540e\uff0cKubernetes\u5c06\u751f\u6210\u7684PV\u7ed1\u5b9a\u5230\u63d0\u4ea4\u7684PVC\uff08\u78c1\u76d8PVC\uff09\u3002\u63a5\u4e0b\u6765\uff0c\u8ba9\u6211\u4eec\u521b\u5efa\u5e76\u4f7f\u7528Pod\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/115-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5728 Pod \u7684 YAML \u6587\u4ef6\u4e2d\uff0c\u58f0\u660e\u8981\u4f7f\u7528\u7684 PVC\u3002\u7136\u540e\uff0c\u521b\u5efa\u6302\u8f7d\u70b9\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/117-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u4ee5\u4e0b\u7684\u56fe\u8868\u8868\u793a\u4e86\u8be5\u4e8b\u4ef6\u3002\u5f53\u8282\u70b9\u88ab\u8c03\u5ea6\u65f6\uff0cattachdetach\u63a7\u5236\u5668\u4f1a\u5c06\u78c1\u76d8\u8fde\u63a5\u5230\u8282\u70b9\u4e0a\u3002\u8fd9\u610f\u5473\u7740\u8c03\u5ea6\u5668\u5c06\u6302\u8f7d\u4e0e\u8c03\u5ea6\u7684\u8282\u70b9\u5bf9\u5e94\u7684\u6301\u4e45\u5377(PV)\u3002\u7136\u540e\uff0cPod\u5185\u76f8\u5e94\u7684\u5bb9\u5668\u4f1a\u542f\u52a8\uff0c\u5e76\u4f7f\u7528\u76f8\u5e94\u7684\u78c1\u76d8\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/119-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0cPVC\u548c\u76f8\u5e94\u7684PV\u5b58\u5728\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/121-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u8bf7\u5220\u9664 PVC\u3002\u6211\u4eec\u53ef\u4ee5\u770b\u5230 PV \u4e5f\u88ab\u5220\u9664\u4e86\u3002\u56e0\u6b64\uff0cPV \u4f1a\u6839\u636e reclaimPolicy \u4e0e PVC \u4e00\u8d77\u88ab\u5220\u9664\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/123-0.png\" alt=\"image.png\" \/><\/div>\n<h1>4) \u5efa\u7b51\u8bbe\u8ba1<\/h1>\n<h3>PV\u548cPVC\u7684\u5904\u7406\u8fc7\u7a0b<\/h3>\n<p>\u8ba9\u6211\u4eec\u770b\u4e00\u4e0b\u56fe\u4e2d\u53f3\u4e0b\u65b9\u7684CSI\uff08\u5bb9\u5668\u5b58\u50a8\u63a5\u53e3\uff09\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/127-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5728Kubernetes\u793e\u7fa4\u4e2d\uff0c\u63a8\u8350\u4f7f\u7528CSI\u6765\u8fdb\u884c\u79bb\u7ebf\u6a21\u5f0f\u3002CSI\u7684\u5b9e\u73b0\u5206\u4e3a\u4e24\u4e2a\u90e8\u5206\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">1\u3064\u306fKubernetes\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u304c\u63a8\u9032\u3059\u308b\u5171\u901a\u90e8\u5206\u3067\u3001\u3053\u306e\u56f3\u306ecsi-provisioner\u3084csi-attacher controller\u306a\u3069\u304c\u305d\u308c\u306b\u3042\u305f\u308a\u307e\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u3082\u3046\u4e00\u3064\u306e\u90e8\u5206\u306f\u3001\u56f3\u306ecsi-controller-server\u3084csi-node-server\u306e\u3088\u3046\u306a\u30af\u30e9\u30a6\u30c9\u30b9\u30c8\u30ec\u30fc\u30b8\u30d9\u30f3\u30c0\u30fc\u306b\u3088\u3063\u3066\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\u3002CSI\u306f\u30af\u30e9\u30a6\u30c9\u30b9\u30c8\u30ec\u30fc\u30b8\u30d9\u30f3\u30c0\u30fc\u306eOpenAPI\u306b\u63a5\u7d9a\u3057\u3066\u3001create\u3001delete\u3001mount\u3001unmount\u306a\u3069\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u95a2\u9023\u306e\u64cd\u4f5c\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002<\/ul>\n<p>\u5f53\u53d1\u9001PVC\u7684YAML\u6587\u4ef6\u65f6\uff0c\u5728\u96c6\u7fa4\u5185\u5c06\u751f\u6210PVC\u5bf9\u8c61\uff0c\u5e76\u7531csi-provisioner\u63a7\u5236\u5668\u8fdb\u884c\u76d1\u89c6\u3002\u7136\u540e\uff0ccsi-provisioner\u4f1a\u6839\u636ePVC\u5bf9\u8c61\u548c\u58f0\u660e\u5728PVC\u5bf9\u8c61\u4e2d\u7684StorageClass\uff0c\u901a\u8fc7GRPC\u8c03\u7528csi-controller-server\uff0c\u5728\u4e91\u5b58\u50a8\u670d\u52a1\u4e0a\u521b\u5efa\u5b9e\u9645\u5b58\u50a8\u5e76\u521b\u5efaPV\u5bf9\u8c61\u3002\u6700\u540e\uff0c\u96c6\u7fa4\u5185\u7684PV\u63a7\u5236\u5668\u5c06PVC\u548cPV\u8fdb\u884c\u7ed1\u5b9a\uff0c\u7136\u540ePV\u5c06\u88ab\u4f7f\u7528\u3002<\/p>\n<p>\u5728\u63d0\u4ea4 Pod \u540e\uff0c\u8c03\u5ea6\u5668\u4f1a\u5b89\u6392\u5408\u9002\u7684\u8282\u70b9\u8fdb\u884c\u8c03\u5ea6\u3002\u5728 Pod \u521b\u5efa\u8fc7\u7a0b\u4e2d\uff0c\u8282\u70b9\u4e0a\u7684 kubelet \u4f1a\u901a\u8fc7 csi-node-server \u5c06\u521b\u5efa\u7684 PV \u6302\u8f7d\u5230 Pod \u7684\u53ef\u7528\u76ee\u5f55\u4e2d\uff0c\u5e76\u521b\u5efa\u548c\u542f\u52a8 Pod \u4e2d\u7684\u6240\u6709\u5bb9\u5668\u3002<\/p>\n<h3>\u4f7f\u7528\u60c5\u51b5\u4e3a PV\u3001PVC \u548c CSI \u57fa\u7840\u7684\u5b58\u50a8\u3002<\/h3>\n<p>\u4ee5\u4e0b\u56fe\u8868\u5c55\u793a\u4e86\u4f7f\u7528PV\u3001PVC\u548cCSI\u7684\u5b58\u50a8\u65b9\u6cd5\u3002<\/p>\n<p>(The following chart illustrates the usage methods of storage using PV, PVC, and CSI.)<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/134-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u6574\u4e2a\u8fc7\u7a0b\u5206\u4e3a\u4e09\u4e2a\u9636\u6bb5\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Create\u30b9\u30c6\u30fc\u30b8\u3067\u306f\u3001PVC\u3092\u63d0\u51fa\u3057\u305f\u5f8c\u3001csi-provisioner\u304c\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u3066PV\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3057\u3001PV\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u304cPVC\u3068\u751f\u6210\u3055\u308c\u305fPV\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u7d50\u5408\u3057\u307e\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Attach\u30b9\u30c6\u30fc\u30b8\u3067\u306f\u3001Pod\u306eYAML\u30d5\u30a1\u30a4\u30eb\u3092\u9001\u4fe1\u3057\u306a\u304c\u3089\u3001\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u304c\u9069\u5207\u306a\u30ce\u30fc\u30c9\u3092\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3057\u307e\u3059\u3002AD\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306f\u3001\u30ce\u30fc\u30c9\u3092\u76e3\u8996\u3057\u305f\u5f8c\u3001Pod\u3067\u4f7f\u7528\u3055\u308c\u3066\u3044\u308bPV\u3092\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002\u305d\u306e\u5f8c\u3001VolumeAttachment\u3068\u3044\u3046\u540d\u524d\u306e\u5185\u90e8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u751f\u6210\u3055\u308c\u3001\u3053\u308c\u304ccsi-attacher\u306e\u30c8\u30ea\u30ac\u30fc\u3068\u306a\u3063\u3066csi-controller-server\u3092\u547c\u3073\u51fa\u3057\u3001\u30af\u30e9\u30a6\u30c9\u30b9\u30c8\u30ec\u30fc\u30b8\u30d9\u30f3\u30c0\u30fc\u306eOpenAPI\u3092\u4f7f\u7528\u3057\u3066\u5b9f\u969b\u306e\u30a2\u30bf\u30c3\u30c1\u64cd\u4f5c\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u30a2\u30bf\u30c3\u30c1\u64cd\u4f5c\u306f\u3001Pod\u304c\u5b9f\u884c\u3055\u308c\u308b\u30ce\u30fc\u30c9\u306b\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u30a2\u30bf\u30c3\u30c1\u3057\u307e\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u30de\u30a6\u30f3\u30c8\u30b9\u30c6\u30fc\u30b8\u306f\u3001kubelet\u304cPod\u3092\u4f5c\u6210\u3057\u3066\u3044\u308b\u3068\u304d\u306b\u59cb\u307e\u308a\u307e\u3059\u3002Pod\u4f5c\u6210\u6642\u306b\u306f\u3001\u30ce\u30fc\u30c9\u306b\u53d6\u308a\u4ed8\u3051\u3089\u308c\u305f\u30c7\u30a3\u30b9\u30af\u304c\u3001Pod\u304b\u3089\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u306a\u7279\u5b9a\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30de\u30a6\u30f3\u30c8\u3055\u308c\u307e\u3059\u3002\u305d\u306e\u5f8c\u3001kubelet\u306f\u30b3\u30f3\u30c6\u30ca\u306e\u4f5c\u6210\u3068\u8d77\u52d5\u3092\u958b\u59cb\u3057\u307e\u3059\u3002<\/ul>\n<p>\u603b\u7ed3\u8d77\u6765\uff0cCreate\u9636\u6bb5\u4f1a\u521b\u5efa\u5b58\u50a8\u3002Attach\u9636\u6bb5\u4f1a\u5c06\u5b58\u50a8\u6302\u8f7d\u5230\u8282\u70b9\u4e0a\uff08\u901a\u5e38\u6302\u8f7d\u5230\u8282\u70b9\u7684\/dev\u76ee\u5f55\u4e0b\uff09\u3002Mount\u9636\u6bb5\u4f1a\u5c06\u5b58\u50a8\u6302\u8f7d\u5230Pod\u53ef\u4ee5\u8bbf\u95ee\u7684\u76ee\u5f55\u4e2d\u3002<\/p>\n<h1>\u603b\u7ed3<\/h1>\n<p>\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u89e3\u91ca\u4e86Kubernetes\u5377\u7684\u5e94\u7528\u573a\u666f\u548c\u9650\u5236\uff0c\u5e76\u5b9a\u4e49\u4e86PVC\u548cPV\u7cfb\u7edf\u3002\u57fa\u4e8e\u8fd9\u4e2a\u7cfb\u7edf\uff0cKubernetes\u5728\u591a\u4e2aPod\u5171\u4eab\u3001\u8fc1\u79fb\u548c\u6269\u5c55\u5b58\u50a8\u7b49\u573a\u666f\u4e0b\u6269\u5c55\u4e86Kubernetes\u5377\u3002\u6b64\u5916\uff0c\u6211\u4eec\u8fd8\u89e3\u91ca\u4e86\u4e0d\u540c\u7684PV\u914d\u7f6e\u6a21\u5f0f\uff08\u9759\u6001\u548c\u52a8\u6001\uff09\uff0c\u4ee5\u53ca\u5982\u4f55\u4e3a\u96c6\u7fa4\u5185\u7684Pod\u5728\u4e0d\u540c\u6a21\u5f0f\u4e4b\u95f4\u8fdb\u884c\u5b58\u50a8\u914d\u7f6e\u3002\u6700\u540e\uff0c\u6211\u4eec\u8be6\u7ec6\u8bf4\u660e\u4e86Kubernetes\u4e2dPVC\u548cPV\u7684\u5904\u7406\u6b65\u9aa4\uff0c\u4ee5\u5e2e\u52a9\u7528\u6237\u7406\u89e3PVC\u548cPV\u7684\u5de5\u4f5c\u539f\u7406\u3002<\/p>\n<p>\u672c\u535a\u5ba2\u662f\u4ece\u82f1\u8bed\u7248\u7ffb\u8bd1\u800c\u6765\u7684\u3002\u60a8\u53ef\u4ee5\u5728\u8fd9\u91cc\u67e5\u770b\u539f\u6587\u3002\u6211\u4eec\u90e8\u5206\u5730\u4f7f\u7528\u673a\u5668\u7ffb\u8bd1\u3002\u5982\u679c\u6709\u4efb\u4f55\u7ffb\u8bd1\u9519\u8bef\uff0c\u8bf7\u60a8\u63d0\u9192\u6211\u4eec\uff0c\u6211\u4eec\u5c06\u4e0d\u80dc\u611f\u6fc0\u3002<\/p>\n<p>\u963f\u91cc\u5df4\u5df4\u4e91\u8ba1\u7b97\u5728\u65e5\u672c\u62e5\u6709\u4e24\u4e2a\u6570\u636e\u4e2d\u5fc3\uff0c\u5e76\u62e5\u6709\u8d85\u8fc760\u4e2a\u53ef\u7528\u533a\u57df\uff0c<br \/>\n\u662f\u4e9a\u592a\u5730\u533a\u7684\u5934\u53f7\u4e91\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u63d0\u4f9b\u5546\uff082019 \u5e74\u7531 Gartner \u8c03\u7814\u5f97\u51fa\u7684\u7ed3\u8bba\uff09\u3002<br \/>\n\u6b32\u4e86\u89e3\u66f4\u591a\u5173\u4e8e\u963f\u91cc\u5df4\u5df4\u4e91\u8ba1\u7b97\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u70b9\u51fb\u8fd9\u91cc\u3002<br \/>\n\u963f\u91cc\u5df4\u5df4\u4e91\u8ba1\u7b97\u65e5\u672c\u5b98\u65b9\u7f51\u9875\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u8bb2\u89e3Kubernetes\u5377\u7684\u9002\u7528\u573a\u666f\u548c\u9650\u5236\uff0c\u4ee5\u53ca\u5904\u7406Kubernetes\u4e2dPVC\u548cPV\u7684\u6b65 [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-35506","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Kubernetes\uff1aKubernetes\u5377\u3001\u6301\u4e45\u5377\u58f0\u660e(PVC)\u3001\u6301\u4e45\u5377(PV) - Blog - Silicon Cloud<\/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.silicloud.com\/zh\/blog\/kubernetes\uff1akubernetes\u5377\u3001\u6301\u4e45\u5377\u58f0\u660epvc\u3001\u6301\u4e45\u5377pv\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Kubernetes\uff1aKubernetes\u5377\u3001\u6301\u4e45\u5377\u58f0\u660e(PVC)\u3001\u6301\u4e45\u5377(PV)\" \/>\n<meta property=\"og:description\" content=\"\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u8bb2\u89e3Kubernetes\u5377\u7684\u9002\u7528\u573a\u666f\u548c\u9650\u5236\uff0c\u4ee5\u53ca\u5904\u7406Kubernetes\u4e2dPVC\u548cPV\u7684\u6b65 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/kubernetes\uff1akubernetes\u5377\u3001\u6301\u4e45\u5377\u58f0\u660epvc\u3001\u6301\u4e45\u5377pv\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-20T19:54:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-28T21:15:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/10-0.png\" \/>\n<meta name=\"author\" content=\"\u79d1, \u9896\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u79d1, \u9896\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/kubernetes%ef%bc%9akubernetes%e5%8d%b7%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7%e5%a3%b0%e6%98%8epvc%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7pv%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/kubernetes%ef%bc%9akubernetes%e5%8d%b7%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7%e5%a3%b0%e6%98%8epvc%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7pv%e3%80%82\/\",\"name\":\"Kubernetes\uff1aKubernetes\u5377\u3001\u6301\u4e45\u5377\u58f0\u660e(PVC)\u3001\u6301\u4e45\u5377(PV) - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-07-20T19:54:25+00:00\",\"dateModified\":\"2024-04-28T21:15:41+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/kubernetes%ef%bc%9akubernetes%e5%8d%b7%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7%e5%a3%b0%e6%98%8epvc%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7pv%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/kubernetes%ef%bc%9akubernetes%e5%8d%b7%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7%e5%a3%b0%e6%98%8epvc%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7pv%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/kubernetes%ef%bc%9akubernetes%e5%8d%b7%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7%e5%a3%b0%e6%98%8epvc%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7pv%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Kubernetes\uff1aKubernetes\u5377\u3001\u6301\u4e45\u5377\u58f0\u660e(PVC)\u3001\u6301\u4e45\u5377(PV)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e\",\"name\":\"\u79d1, \u9896\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g\",\"caption\":\"\u79d1, \u9896\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keying\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/kubernetes%ef%bc%9akubernetes%e5%8d%b7%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7%e5%a3%b0%e6%98%8epvc%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7pv%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Kubernetes\uff1aKubernetes\u5377\u3001\u6301\u4e45\u5377\u58f0\u660e(PVC)\u3001\u6301\u4e45\u5377(PV) - Blog - Silicon Cloud","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.silicloud.com\/zh\/blog\/kubernetes\uff1akubernetes\u5377\u3001\u6301\u4e45\u5377\u58f0\u660epvc\u3001\u6301\u4e45\u5377pv\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"Kubernetes\uff1aKubernetes\u5377\u3001\u6301\u4e45\u5377\u58f0\u660e(PVC)\u3001\u6301\u4e45\u5377(PV)","og_description":"\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u8bb2\u89e3Kubernetes\u5377\u7684\u9002\u7528\u573a\u666f\u548c\u9650\u5236\uff0c\u4ee5\u53ca\u5904\u7406Kubernetes\u4e2dPVC\u548cPV\u7684\u6b65 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/kubernetes\uff1akubernetes\u5377\u3001\u6301\u4e45\u5377\u58f0\u660epvc\u3001\u6301\u4e45\u5377pv\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-07-20T19:54:25+00:00","article_modified_time":"2024-04-28T21:15:41+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d234637434c4406c2a0f8\/10-0.png"}],"author":"\u79d1, \u9896","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u79d1, \u9896","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/kubernetes%ef%bc%9akubernetes%e5%8d%b7%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7%e5%a3%b0%e6%98%8epvc%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7pv%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/kubernetes%ef%bc%9akubernetes%e5%8d%b7%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7%e5%a3%b0%e6%98%8epvc%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7pv%e3%80%82\/","name":"Kubernetes\uff1aKubernetes\u5377\u3001\u6301\u4e45\u5377\u58f0\u660e(PVC)\u3001\u6301\u4e45\u5377(PV) - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-07-20T19:54:25+00:00","dateModified":"2024-04-28T21:15:41+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/kubernetes%ef%bc%9akubernetes%e5%8d%b7%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7%e5%a3%b0%e6%98%8epvc%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7pv%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/kubernetes%ef%bc%9akubernetes%e5%8d%b7%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7%e5%a3%b0%e6%98%8epvc%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7pv%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/kubernetes%ef%bc%9akubernetes%e5%8d%b7%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7%e5%a3%b0%e6%98%8epvc%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7pv%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"Kubernetes\uff1aKubernetes\u5377\u3001\u6301\u4e45\u5377\u58f0\u660e(PVC)\u3001\u6301\u4e45\u5377(PV)"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e","name":"\u79d1, \u9896","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g","caption":"\u79d1, \u9896"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keying\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/kubernetes%ef%bc%9akubernetes%e5%8d%b7%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7%e5%a3%b0%e6%98%8epvc%e3%80%81%e6%8c%81%e4%b9%85%e5%8d%b7pv%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/35506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=35506"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/35506\/revisions"}],"predecessor-version":[{"id":83265,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/35506\/revisions\/83265"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=35506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=35506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=35506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}