{"id":39461,"date":"2025-05-23T18:52:23","date_gmt":"2025-05-23T10:52:23","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/39461.html"},"modified":"2025-05-23T18:52:23","modified_gmt":"2025-05-23T10:52:23","slug":"kubernetes-%e8%bf%90%e7%bb%b4%e6%93%8d%e4%bd%9c%e6%89%8b%e5%86%8c%ef%bc%9a%e4%bb%8e-etcd-%e5%bf%ab%e7%85%a7%e8%bf%9b%e8%a1%8c%e7%b2%be%e7%a1%ae%e6%81%a2%e5%a4%8d","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/39461.html","title":{"rendered":"Kubernetes \u8fd0\u7ef4\u64cd\u4f5c\u624b\u518c\uff1a\u4ece etcd \u5feb\u7167\u8fdb\u884c\u7cbe\u786e\u6062\u590d"},"content":{"rendered":"<p>1<\/p>\n<h4>\u00a0 \u00a0<\/h4>\n<p style=\"text-align: justify\">5 \u6b65\u5b9e\u73b0 etcd \u7cbe\u786e\u6062\u590d<\/p>\n<li>\n<p style=\"text-align: justify\">\u5c06\u5feb\u7167\u6062\u590d\u5230\u672c\u5730 etcd \u6570\u636e\u76ee\u5f55\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-align: justify\">\u4f7f\u7528\u6062\u590d\u7684\u6570\u636e\u542f\u52a8\u672c\u5730 etcd \u5b9e\u4f8b\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-align: justify\">\u4f7f\u7528 etcdctl \u67e5\u8be2\u7279\u5b9a\u952e&#xff08;\u4f8b\u5982&#xff0c;ConfigMap&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-align: justify\">\u4f7f\u7528 auger \u89e3\u7801\u4ee5\u63d0\u53d6\u5e72\u51c0\u7684 YAML\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-align: justify\">\u4f7f\u7528 kubectl \u7533\u8bf7\u6062\u590d\u5230\u60a8\u7684\u5b9e\u65f6\u96c6\u7fa4\u3002<\/p>\n<\/li>\n<p style=\"text-align: justify\">\u672c\u6307\u5357\u5c06\u6307\u5bfc\u60a8\u4ece etcd \u5feb\u7167\u4e2d\u7cbe\u51c6\u5730\u6062\u590d\u8d44\u6e90&#xff0c;\u800c\u65e0\u9700\u89e6\u53d1\u5b8c\u6574\u7684\u96c6\u7fa4\u6062\u590d\u3002\u65e0\u8bba\u60a8\u662f\u8981\u6392\u9664\u610f\u5916\u5220\u9664\u6545\u969c&#xff0c;\u8fd8\u662f\u8fdb\u884c\u53d6\u8bc1\u8c03\u8bd5&#xff0c;\u8fd9\u79cd\u8f7b\u91cf\u7ea7\u4e14\u6709\u9488\u5bf9\u6027\u7684\u65b9\u6cd5\u90fd\u80fd\u6700\u5927\u7a0b\u5ea6\u5730\u51cf\u5c11\u505c\u673a\u65f6\u95f4\u3002#Kubernetes<\/p>\n<p>2<\/p>\n<h4>\u00a0 \u00a0<\/h4>\n<p style=\"text-align: justify\">\u5f15\u8a00&#xff1a;&#x1fa7a;Kubernetes \u64cd\u4f5c\u91cc\u7684\u7d27\u6025\u60c5\u51b5<\/p>\n<p style=\"text-align: justify\">etcd \u662f Kubernetes \u96c6\u7fa4\u7684\u6838\u5fc3&#xff0c;\u5b83\u662f\u4e00\u4e2a\u5206\u5e03\u5f0f\u952e\u503c\u5b58\u50a8\u7cfb\u7edf&#xff0c;\u5fe0\u5b9e\u5730\u7ef4\u62a4\u7cfb\u7edf\u5185\u6bcf\u4e2a\u5bf9\u8c61\u7684\u72b6\u6001\u3002\u4f46\u662f&#xff0c;\u5982\u679c\u67d0\u4e2a\u8d44\u6e90&#xff08;\u4f8b\u5982 ConfigMap\u3001Secret \u6216 Deployment&#xff09;\u88ab\u5220\u9664\u6216\u635f\u574f&#xff0c;\u4f1a\u53d1\u751f\u4ec0\u4e48\u60c5\u51b5\u5462&#xff1f;<\/p>\n<p style=\"text-align: justify\">\u542f\u52a8\u5b8c\u6574\u7684\u96c6\u7fa4\u6062\u590d\u5c31\u50cf\u8fdb\u884c\u5fc3\u810f\u624b\u672f\u6765\u4fee\u590d\u7eb8\u5f20\u5212\u4f24\u4e00\u6837\u3002\u5b83\u5177\u6709\u7834\u574f\u6027\u3001\u98ce\u9669\u6027&#xff0c;\u800c\u4e14\u901a\u5e38\u6ca1\u6709\u5fc5\u8981\u3002<\/p>\n<p style=\"text-align: justify\">\u8fd9\u5c31\u662f\u624b\u672f\u7cbe\u5ea6\u53d1\u6325\u4f5c\u7528\u7684\u5730\u65b9\u3002<\/p>\n<p style=\"text-align: justify\">\u60f3\u8c61\u4e00\u4e0b&#xff0c;\u60a8\u7684\u751f\u4ea7\u73af\u5883\u9677\u5165\u5371\u673a\u2014\u2014\u4e00\u4e2a\u91cd\u8981\u7684 ConfigMap \u6d88\u5931\u4e86&#xff0c;Pod \u5d29\u6e83\u4e86&#xff0c;\u7528\u6237\u53ea\u80fd\u76ef\u7740\u9519\u8bef\u9875\u9762\u3002\u5b8c\u5168\u56de\u6eda\u4f1a\u6bd4\u95ee\u9898\u672c\u8eab\u9020\u6210\u66f4\u5927\u7684\u635f\u5931\u3002\u60a8\u9700\u8981\u7684\u662f\u4e00\u4e2a\u201c\u5916\u79d1\u533b\u751f\u201d\u5f0f\u7684\u65b9\u6848&#xff1a;\u53ea\u4fee\u590d\u635f\u574f\u7684\u90e8\u5206&#xff0c;\u5176\u4ed6\u90e8\u5206\u4e00\u6982\u4e0d\u505a\u3002<\/p>\n<p style=\"text-align: justify\">\u5728\u672c\u535a\u5ba2\u4e2d&#xff0c;\u60a8\u5c06\u4e86\u89e3\u5982\u4f55&#xff1a;<\/p>\n<li>\n<p style=\"text-align: justify\">\u4ece etcd \u5feb\u7167\u4e2d\u9694\u79bb\u5e76\u63d0\u53d6\u7279\u5b9a\u8d44\u6e90<\/p>\n<\/li>\n<li>\n<p style=\"text-align: justify\">\u4ec5\u5c06\u6240\u9700\u5185\u5bb9\u76f4\u63a5\u6062\u590d\u5230\u5b9e\u65f6 Kubernetes \u96c6\u7fa4\u4e2d<\/p>\n<\/li>\n<li>\n<p style=\"text-align: justify\">\u907f\u514d\u4e0d\u5fc5\u8981\u7684\u505c\u673a\u5e76\u4fdd\u6301\u96c6\u7fa4\u7a33\u5b9a\u6027<\/p>\n<\/li>\n<li>\n<p style=\"text-align: justify\">\u975e\u5e38\u9002\u5408\u91cd\u89c6\u6700\u5c0f\u5f71\u54cd\u6062\u590d\u7684 DevOps\u3001SRE \u548c Kubernetes \u7ba1\u7406\u5458\u3002<\/p>\n<\/li>\n<p>3<\/p>\n<h4>\u00a0 \u00a0<\/h4>\n<p style=\"text-align: justify\">\u5148\u51b3\u6761\u4ef6&#x1f527;<\/p>\n<p style=\"text-align: justify\">\u4e3a\u4e86\u7ee7\u7eed\u64cd\u4f5c&#xff0c;\u8bf7\u786e\u4fdd\u60a8\u5df2\u5177\u5907&#xff1a;<\/p>\n<ul>\n<li>\n<p style=\"text-align: justify\">etcd v3.4&#043; \u2014 etcd \u670d\u52a1\u5668\u4e8c\u8fdb\u5236\u6587\u4ef6\u53ef\u5728\u6b64\u5904\u83b7\u53d6<\/p>\n<\/li>\n<li>\n<p style=\"text-align: justify\">etcdctl \u2014 \u4e0e etcd \u4ea4\u4e92\u7684 CLI<\/p>\n<\/li>\n<li>\n<p style=\"text-align: justify\">auger \u2014 CLI \u5de5\u5177&#xff0c;\u7528\u4e8e\u5c06 etcd \u7684\u4e8c\u8fdb\u5236\u6709\u6548\u8d1f\u8f7d\u89e3\u7801\u4e3a YAML<\/p>\n<\/li>\n<li>\n<p style=\"text-align: justify\">kubectl \u2014 CLI \u7528\u4e8e\u5c06\u8d44\u6e90\u5e94\u7528\u4e8e Kubernetes \u96c6\u7fa4<\/p>\n<\/li>\n<li>\n<p style=\"text-align: justify\">\u5feb\u7167\u6587\u4ef6\u2014 \u4f8b\u5982 live-cluster-snapshot.db<\/p>\n<\/li>\n<\/ul>\n<p style=\"text-align: justify\">\u59cb\u7ec8\u5148\u5728\u6682\u5b58\u73af\u5883\u4e2d\u5de5\u4f5c\u3002\u4ece\u5e72\u51c0\u7684\u5feb\u7167\u5f00\u59cb&#xff1a;<\/p>\n<p style=\"text-align: justify\">etcdctl snapshot save live-cluster-snapshot.db<\/p>\n<p>4<\/p>\n<h4>\u00a0 \u00a0<\/h4>\n<p style=\"text-align: justify\">\u6062\u590d\u8fc7\u7a0b&#x1f3e5;<\/p>\n<p style=\"text-align: justify\">\u5047\u8bbe production \u547d\u540d\u7a7a\u95f4\u4e2d\u4e00\u4e2a\u5173\u952e\u7684 ConfigMap app-config \u88ab\u610f\u5916\u5220\u9664\u4e86\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u5c06\u5176\u6062\u590d&#xff1a;<\/p>\n<p>4.1<\/p>\n<h4>\u00a0 \u00a0<\/h4>\n<p style=\"text-align: justify\">&#x1f9ec; \u6b65\u9aa4 1&#xff1a;\u51c6\u5907\u5feb\u7167<\/p>\n<p style=\"text-align: justify\">\u5982\u679c\u538b\u7f29&#xff0c;\u8bf7\u89e3\u538b\u7f29\u5feb\u7167&#xff1a;<\/p>\n<p style=\"text-align: justify\">gunzip live-cluster-snapshot.db.gz<\/p>\n<p style=\"text-align: justify\">\u7136\u540e\u6062\u590d\u5b83&#xff1a;<\/p>\n<p style=\"text-align: justify\">etcdctl snapshot restore live-cluster-snapshot.db &#8211;data-dir&#061;recovery-etcd<\/p>\n<p>4.2<\/p>\n<h4>\u00a0 \u00a0<\/h4>\n<p style=\"text-align: justify\">&#x1fa7b; \u7b2c 2 \u6b65&#xff1a;\u542f\u52a8\u672c\u5730 etcd \u5b9e\u4f8b<\/p>\n<p style=\"text-align: justify\">etcd &#8211;data-dir&#061;recovery-etcd &#8211;listen-client-urls&#061;http:\/\/localhost:2379<\/p>\n<p style=\"text-align: justify\">\u6838\u5b9e&#xff1a;<\/p>\n<p> etcdctl &#8211;endpoints&#061;localhost:2379 endpoint status <\/p>\n<p>4.3<\/p>\n<h4>\u00a0 \u00a0<\/h4>\n<p style=\"text-align: justify\">&#x1f50d; \u6b65\u9aa4 3&#xff1a;\u5b9a\u4f4d\u5e76\u63d0\u53d6\u8d44\u6e90<\/p>\n<p style=\"text-align: justify\">Kubernetes \u5c06 ConfigMap \u5b58\u50a8\u5728\u7c7b\u4f3c \/registry\/configmaps\/\/\u7684\u952e\u4e2d\u3002\u5217\u51fa\u751f\u4ea7\u547d\u540d\u7a7a\u95f4\u4e2d\u7684\u952e&#xff1a;<\/p>\n<p style=\"text-align: justify\">etcdctl &#8211;endpoints&#061;localhost:2379 get &#8211;prefix &#034;\/registry\/configmaps\/production&#034; &#8211;keys-only\u4f60\u4f1a\u770b\u5230\u7c7b\u4f3c\u8fd9\u6837\u7684\u5185\u5bb9&#xff1a;<\/p>\n<p style=\"text-align: justify\">\/registry\/configmaps\/production\/app-config\u63d0\u53d6\u5e76\u89e3\u7801 ConfigMap&#xff1a;<\/p>\n<p style=\"text-align: justify\">etcdctl &#8211;endpoints&#061;localhost:2379 get \/registry\/configmaps\/production\/app-config &#8211;print-value-only | auger decode &gt; app-config.yaml<\/p>\n<p style=\"text-align: justify\">\u751f\u6210\u7684 app-config.yaml \u53ef\u80fd\u5982\u4e0b\u6240\u793a&#xff1a;<\/p>\n<p> apiVersion: v1\u00a0 kind: ConfigMap\u00a0 metadata:\u00a0 \u00a0 name: app-config\u00a0 \u00a0 namespace: production\u00a0 data:\u00a0 \u00a0 api-url: &#034;https:\/\/api.example.com&#034;\u00a0 \u00a0 log-level: &#034;debug&#034; <\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250523105222-683053668790b.png\" \/><\/p>\n<p>4.4<\/p>\n<h4>\u00a0 \u00a0<\/h4>\n<p style=\"text-align: justify\">\u6b65\u9aa4 4&#xff1a;\u6062\u590d\u5230\u96c6\u7fa4<\/p>\n<p style=\"text-align: justify\">\u901a\u8fc7\u8bd5\u8fd0\u884c\u6765\u6d4b\u8bd5\u4fee\u590d\u6548\u679c&#xff1a;<\/p>\n<p style=\"text-align: justify\">kubectl apply -f app-config.yaml &#8211;dry-run&#061;server<\/p>\n<p style=\"text-align: justify\">\u5982\u679c\u4e00\u5207\u68c0\u67e5\u65e0\u8bef&#xff0c;\u5219\u5e94\u7528\u5b83&#xff1a;<\/p>\n<p style=\"text-align: justify\">kubectl apply -f app-config.yaml<\/p>\n<p style=\"text-align: justify\">\u8f93\u51fa&#xff1a;<\/p>\n<p style=\"text-align: justify\">configmap\/app-config created<\/p>\n<p>4.5<\/p>\n<h4>\u00a0 \u00a0<\/h4>\n<p style=\"text-align: justify\">&#x1f9f9; \u6b65\u9aa4 5&#xff1a;\u6e05\u7406<\/p>\n<p> pkill etcdrm -rf recovery-etcd app-config.yaml <\/p>\n<p>5<\/p>\n<h4>\u00a0 \u00a0<\/h4>\n<p style=\"text-align: justify\">\u9ad8\u7ea7\u573a\u666f&#x1f50d;<\/p>\n<p>5.1<\/p>\n<h4>\u00a0 \u00a0<\/h4>\n<p style=\"text-align: justify\">&#x1f4a0; \u8de8\u547d\u540d\u7a7a\u95f4\u6062\u590d<\/p>\n<p style=\"text-align: justify\">cat app-config.yaml | yq eval &#039;.metadata.namespace &#061; &#034;dev&#034;&#039; | kubectl apply -f &#8211;<\/p>\n<p>5.2<\/p>\n<h4>\u00a0 \u00a0<\/h4>\n<p style=\"text-align: justify\">&#x1f510; \u52a0\u5bc6\u96c6\u7fa4 (KMS)<\/p>\n<p style=\"text-align: justify\">\u4f7f\u7528 etcdctl \u5e76\u6839\u636e etcd \u52a0\u5bc6\u6307\u5357\u914d\u7f6e\u89e3\u5bc6\u5bc6\u94a5\u3002&#x1f4e6;\u6279\u91cf\u6062\u590d\u00a0<\/p>\n<p> etcdctl &#8211;endpoints&#061;localhost:2379 get &#8211;prefix &#034;\/registry\/configmaps\/production&#034; &#8211;print-value-only | auger decode &gt; all-cm.yaml <\/p>\n<p>6<\/p>\n<h4>\u00a0 \u00a0<\/h4>\n<p style=\"text-align: justify\">\u603b\u7ed3<\/p>\n<p style=\"text-align: justify\">\u6700\u540e\u7684\u60f3\u6cd5&#x1f4a1;Kubernetes \u7ba1\u7406\u5458\u7ecf\u5e38\u4e3a\u707e\u96be\u6027\u6545\u969c\u505a\u51c6\u5907&#xff0c;\u4f46\u5ffd\u7565\u4e86\u7cbe\u786e\u6062\u590d\u7684\u4ef7\u503c\u3002\u80fd\u591f\u7cbe\u51c6\u5730\u63d0\u53d6\u548c\u6062\u590d\u8d44\u6e90&#xff0c;\u5e76\u51cf\u5c11\u505c\u673a\u65f6\u95f4\u3001\u9632\u6b62\u9644\u5e26\u635f\u5bb3\u3001\u589e\u5f3a\u5bf9\u4e8b\u4ef6\u54cd\u5e94\u7684\u4fe1\u5fc3\u3002\u5f53\u4e0b\u6b21\u707e\u96be\u6765\u4e34\u65f6&#xff0c;\u60a8\u4e0d\u4f1a\u624b\u5fd9\u811a\u4e71&#xff0c;\u800c\u662f\u4f1a\u91c7\u53d6\u884c\u52a8\u3002<\/p>\n<p style=\"text-align: left\">\u968f\u624b\u5173\u6ce8\u6216\u8005\u201d\u5728\u770b\u201c&#xff0c;\u8bda\u631a\u611f\u8c22&#xff01;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb905\u6b21\uff0c\u70b9\u8d5e5\u6b21\uff0c\u6536\u85cf9\u6b21\u3002etcd \u662f Kubernetes \u96c6\u7fa4\u7684\u6838\u5fc3\uff0c\u5b83\u662f\u4e00\u4e2a\u5206\u5e03\u5f0f\u952e\u503c\u5b58\u50a8\u7cfb\u7edf\uff0c\u5fe0\u5b9e\u5730\u7ef4\u62a4\u7cfb\u7edf\u5185\u6bcf\u4e2a\u5bf9\u8c61\u7684\u72b6\u6001\u3002\u60f3\u8c61\u4e00\u4e0b\uff0c\u60a8\u7684\u751f\u4ea7\u73af\u5883\u9677\u5165\u5371\u673a\u2014\u2014\u4e00\u4e2a\u91cd\u8981\u7684 ConfigMap \u6d88\u5931\u4e86\uff0cPod \u5d29\u6e83\u4e86\uff0c\u7528\u6237\u53ea\u80fd\u76ef\u7740\u9519\u8bef\u9875\u9762\u3002\u60a8\u9700\u8981\u7684\u662f\u4e00\u4e2a\u201c\u5916\u79d1\u533b\u751f\u201d\u5f0f\u7684\u65b9\u6848\uff1a\u53ea\u4fee\u590d\u635f\u574f\u7684\u90e8\u5206\uff0c\u5176\u4ed6\u90e8\u5206\u4e00\u6982\u4e0d\u505a\u3002\u6700\u540e\u7684\u60f3\u6cd5\ud83d\udca1Kubernetes \u7ba1\u7406\u5458\u7ecf\u5e38\u4e3a\u707e\u96be\u6027\u6545\u969c\u505a\u51c6\u5907\uff0c\u4f46\u5ffd\u7565\u4e86\u7cbe\u786e\u6062\u590d\u7684\u4ef7\u503c\u3002\u672c\u6307\u5357\u5c06\u6307\u5bfc\u60a8\u4ece etcd \u5feb\u7167\u4e2d\u7cbe\u51c6\u5730\u6062\u590d\u8d44\u6e90\uff0c\u800c\u65e0\u9700\u89e6\u53d1\u5b8c\u6574\u7684\u96c6\u7fa4\u6062\u590d\u3002\u4f7f\u7528 kubectl \u7533\u8bf7\u6062\u590d\u5230\u60a8\u7684\u5b9e\u65f6\u96c6\u7fa4\u3002_etcd\u4f7f\u7528\u5feb\u7167\u542f\u52a8<\/p>\n","protected":false},"author":2,"featured_media":39460,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1686,120,763,121,44],"topic":[],"class_list":["post-39461","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-etcd","tag-kubernetes","tag-763","tag-121","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Kubernetes \u8fd0\u7ef4\u64cd\u4f5c\u624b\u518c\uff1a\u4ece etcd \u5feb\u7167\u8fdb\u884c\u7cbe\u786e\u6062\u590d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/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.wsisp.com\/helps\/39461.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Kubernetes \u8fd0\u7ef4\u64cd\u4f5c\u624b\u518c\uff1a\u4ece etcd \u5feb\u7167\u8fdb\u884c\u7cbe\u786e\u6062\u590d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb905\u6b21\uff0c\u70b9\u8d5e5\u6b21\uff0c\u6536\u85cf9\u6b21\u3002etcd \u662f Kubernetes \u96c6\u7fa4\u7684\u6838\u5fc3\uff0c\u5b83\u662f\u4e00\u4e2a\u5206\u5e03\u5f0f\u952e\u503c\u5b58\u50a8\u7cfb\u7edf\uff0c\u5fe0\u5b9e\u5730\u7ef4\u62a4\u7cfb\u7edf\u5185\u6bcf\u4e2a\u5bf9\u8c61\u7684\u72b6\u6001\u3002\u60f3\u8c61\u4e00\u4e0b\uff0c\u60a8\u7684\u751f\u4ea7\u73af\u5883\u9677\u5165\u5371\u673a\u2014\u2014\u4e00\u4e2a\u91cd\u8981\u7684 ConfigMap \u6d88\u5931\u4e86\uff0cPod \u5d29\u6e83\u4e86\uff0c\u7528\u6237\u53ea\u80fd\u76ef\u7740\u9519\u8bef\u9875\u9762\u3002\u60a8\u9700\u8981\u7684\u662f\u4e00\u4e2a\u201c\u5916\u79d1\u533b\u751f\u201d\u5f0f\u7684\u65b9\u6848\uff1a\u53ea\u4fee\u590d\u635f\u574f\u7684\u90e8\u5206\uff0c\u5176\u4ed6\u90e8\u5206\u4e00\u6982\u4e0d\u505a\u3002\u6700\u540e\u7684\u60f3\u6cd5\ud83d\udca1Kubernetes \u7ba1\u7406\u5458\u7ecf\u5e38\u4e3a\u707e\u96be\u6027\u6545\u969c\u505a\u51c6\u5907\uff0c\u4f46\u5ffd\u7565\u4e86\u7cbe\u786e\u6062\u590d\u7684\u4ef7\u503c\u3002\u672c\u6307\u5357\u5c06\u6307\u5bfc\u60a8\u4ece etcd \u5feb\u7167\u4e2d\u7cbe\u51c6\u5730\u6062\u590d\u8d44\u6e90\uff0c\u800c\u65e0\u9700\u89e6\u53d1\u5b8c\u6574\u7684\u96c6\u7fa4\u6062\u590d\u3002\u4f7f\u7528 kubectl \u7533\u8bf7\u6062\u590d\u5230\u60a8\u7684\u5b9e\u65f6\u96c6\u7fa4\u3002_etcd\u4f7f\u7528\u5feb\u7167\u542f\u52a8\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/39461.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-23T10:52:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250523105222-683053668790b.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/39461.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/39461.html\",\"name\":\"Kubernetes \u8fd0\u7ef4\u64cd\u4f5c\u624b\u518c\uff1a\u4ece etcd \u5feb\u7167\u8fdb\u884c\u7cbe\u786e\u6062\u590d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-05-23T10:52:23+00:00\",\"dateModified\":\"2025-05-23T10:52:23+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/39461.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/39461.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/39461.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Kubernetes \u8fd0\u7ef4\u64cd\u4f5c\u624b\u518c\uff1a\u4ece etcd \u5feb\u7167\u8fdb\u884c\u7cbe\u786e\u6062\u590d\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Kubernetes \u8fd0\u7ef4\u64cd\u4f5c\u624b\u518c\uff1a\u4ece etcd \u5feb\u7167\u8fdb\u884c\u7cbe\u786e\u6062\u590d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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.wsisp.com\/helps\/39461.html","og_locale":"zh_CN","og_type":"article","og_title":"Kubernetes \u8fd0\u7ef4\u64cd\u4f5c\u624b\u518c\uff1a\u4ece etcd \u5feb\u7167\u8fdb\u884c\u7cbe\u786e\u6062\u590d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb905\u6b21\uff0c\u70b9\u8d5e5\u6b21\uff0c\u6536\u85cf9\u6b21\u3002etcd \u662f Kubernetes \u96c6\u7fa4\u7684\u6838\u5fc3\uff0c\u5b83\u662f\u4e00\u4e2a\u5206\u5e03\u5f0f\u952e\u503c\u5b58\u50a8\u7cfb\u7edf\uff0c\u5fe0\u5b9e\u5730\u7ef4\u62a4\u7cfb\u7edf\u5185\u6bcf\u4e2a\u5bf9\u8c61\u7684\u72b6\u6001\u3002\u60f3\u8c61\u4e00\u4e0b\uff0c\u60a8\u7684\u751f\u4ea7\u73af\u5883\u9677\u5165\u5371\u673a\u2014\u2014\u4e00\u4e2a\u91cd\u8981\u7684 ConfigMap \u6d88\u5931\u4e86\uff0cPod \u5d29\u6e83\u4e86\uff0c\u7528\u6237\u53ea\u80fd\u76ef\u7740\u9519\u8bef\u9875\u9762\u3002\u60a8\u9700\u8981\u7684\u662f\u4e00\u4e2a\u201c\u5916\u79d1\u533b\u751f\u201d\u5f0f\u7684\u65b9\u6848\uff1a\u53ea\u4fee\u590d\u635f\u574f\u7684\u90e8\u5206\uff0c\u5176\u4ed6\u90e8\u5206\u4e00\u6982\u4e0d\u505a\u3002\u6700\u540e\u7684\u60f3\u6cd5\ud83d\udca1Kubernetes \u7ba1\u7406\u5458\u7ecf\u5e38\u4e3a\u707e\u96be\u6027\u6545\u969c\u505a\u51c6\u5907\uff0c\u4f46\u5ffd\u7565\u4e86\u7cbe\u786e\u6062\u590d\u7684\u4ef7\u503c\u3002\u672c\u6307\u5357\u5c06\u6307\u5bfc\u60a8\u4ece etcd \u5feb\u7167\u4e2d\u7cbe\u51c6\u5730\u6062\u590d\u8d44\u6e90\uff0c\u800c\u65e0\u9700\u89e6\u53d1\u5b8c\u6574\u7684\u96c6\u7fa4\u6062\u590d\u3002\u4f7f\u7528 kubectl \u7533\u8bf7\u6062\u590d\u5230\u60a8\u7684\u5b9e\u65f6\u96c6\u7fa4\u3002_etcd\u4f7f\u7528\u5feb\u7167\u542f\u52a8","og_url":"https:\/\/www.wsisp.com\/helps\/39461.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-05-23T10:52:23+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250523105222-683053668790b.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/39461.html","url":"https:\/\/www.wsisp.com\/helps\/39461.html","name":"Kubernetes \u8fd0\u7ef4\u64cd\u4f5c\u624b\u518c\uff1a\u4ece etcd \u5feb\u7167\u8fdb\u884c\u7cbe\u786e\u6062\u590d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-05-23T10:52:23+00:00","dateModified":"2025-05-23T10:52:23+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/39461.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/39461.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/39461.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Kubernetes \u8fd0\u7ef4\u64cd\u4f5c\u624b\u518c\uff1a\u4ece etcd \u5feb\u7167\u8fdb\u884c\u7cbe\u786e\u6062\u590d"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/39461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=39461"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/39461\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/39460"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=39461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=39461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=39461"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=39461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}