{"id":39472,"date":"2025-05-23T18:52:29","date_gmt":"2025-05-23T10:52:29","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/39472.html"},"modified":"2025-05-23T18:52:29","modified_gmt":"2025-05-23T10:52:29","slug":"kubernetes-etcd-%e6%95%85%e9%9a%9c%e6%81%a2%e5%a4%8d1","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/39472.html","title":{"rendered":"Kubernetes etcd \u6545\u969c\u6062\u590d(1)"},"content":{"rendered":"<h4 id=\"\u6dfb\u52a0\u65b0\u6210\u5458\">\u00a0\u6dfb\u52a0\u65b0\u6210\u5458<\/h4>\n<p>\u6dfb\u52a0\u6210\u5458\u7684\u8fc7\u7a0b\u6709\u4e24\u4e2a\u6b65\u9aa4&#xff1a;<\/p>\n<ul>\n<li>\u901a\u8fc7\u00a0HTTP members API\u00a0\u6dfb\u52a0\u65b0\u6210\u5458\u5230\u96c6\u7fa4,\u00a0gRPC members API, \u6216\u8005\u00a0etcdctl member add\u00a0\u547d\u4ee4.<\/li>\n<li>\u4f7f\u7528\u65b0\u7684\u5c42\u539f\u914d\u7f6e\u542f\u52a8\u65b0\u6210\u5458&#xff0c;\u5305\u62ec\u66f4\u65b0\u540e\u7684\u6210\u5458\u5217\u8868(\u4ee5\u540e\u6210\u5458\u52a0\u65b0\u6210\u5458)<\/li>\n<\/ul>\n<p>\u4f7f\u7528\u00a0etcdctl\u00a0\u6307\u5b9a\u00a0name\u00a0\u548c\u00a0advertised peer URLs\u00a0\u6765\u6dfb\u52a0\u65b0\u7684\u6210\u5458\u5230\u96c6\u7fa4:<\/p>\n<p>$ etcdctl member add infra3 http:\/\/10.0.1.13:2380 added member 9bf1b35fc7761a23 to cluster<\/p>\n<p>ETCD_NAME&#061;&#034;infra3&#034; ETCD_INITIAL_CLUSTER&#061;&#034;infra0&#061;http:\/\/10.0.1.10:2380,infra1&#061;http:\/\/10.0.1.11:2380,infra2&#061;http:\/\/10.0.1.12:2380,infra3&#061;http:\/\/10.0.1.13:2380&#034; ETCD_INITIAL_CLUSTER_STATE&#061;existing<\/p>\n<p>\u00a0<\/p>\n<p>etcdctl\u00a0\u5df2\u7ecf\u7ed9\u51fa\u5173\u4e8e\u65b0\u6210\u5458\u7684\u96c6\u7fa4\u4fe1\u606f\u5e76\u6253\u5370\u51fa\u6210\u529f\u542f\u52a8\u5b83\u9700\u8981\u7684\u73af\u5883\u53d8\u91cf\u3002\u73b0\u5728\u7528\u5173\u8054\u7684\u6807\u8bb0\u4e3a\u65b0\u7684\u6210\u5458\u542f\u52a8\u65b0 etcd \u8fdb\u7a0b:<\/p>\n<p>$ export ETCD_NAME&#061;&#034;infra3&#034; $ export ETCD_INITIAL_CLUSTER&#061;&#034;infra0&#061;http:\/\/10.0.1.10:2380,infra1&#061;http:\/\/10.0.1.11:2380,infra2&#061;http:\/\/10.0.1.12:2380,infra3&#061;http:\/\/10.0.1.13:2380&#034; $ export ETCD_INITIAL_CLUSTER_STATE&#061;existing $ etcd &#8211;listen-client-urls http:\/\/10.0.1.13:2379 &#8211;advertise-client-urls http:\/\/10.0.1.13:2379 &#8211;listen-peer-urls http:\/\/10.0.1.13:2380 &#8211;initial-advertise-peer-urls http:\/\/10.0.1.13:2380 &#8211;data-dir %data_dir%\u00a0<\/p>\n<p><span style=\"background-color:#ff9900\">\u65b0\u6210\u5458\u5c06\u4f5c\u4e3a\u96c6\u7fa4\u7684\u4e00\u90e8\u5206\u8fd0\u884c\u5e76\u7acb\u5373\u5f00\u59cb\u8d76\u4e0a\u96c6\u7fa4\u7684\u5176\u4ed6\u6210\u5458\u3002<\/span><\/p>\n<p>\u5982\u679c\u6dfb\u52a0\u591a\u4e2a\u6210\u5458&#xff0c;\u6700\u4f73\u5b9e\u8df5\u662f\u4e00\u6b21\u914d\u7f6e\u5355\u4e2a\u6210\u5458\u5e76\u5728\u6dfb\u52a0\u66f4\u591a\u65b0\u6210\u5458\u524d\u9a8c\u8bc1\u5b83\u6b63\u786e\u542f\u52a8\u3002<\/p>\n<p><span style=\"background-color:#a2e043\">\u5982\u679c\u6dfb\u52a0\u65b0\u6210\u5458\u5230\u4e00\u4e2a\u8282\u70b9\u7684\u96c6\u7fa4&#xff0c;\u5728\u65b0\u6210\u5458\u542f\u52a8\u524d\u96c6\u7fa4\u65e0\u6cd5\u7ee7\u7eed\u5de5\u4f5c&#xff0c;\u56e0\u4e3a\u5b83\u9700\u8981\u4e24\u4e2a\u6210\u5458\u4f5c\u4e3agalosh\u624d\u80fd\u5728\u4e00\u81f4\u6027\u4e0a\u8fbe\u6210\u4e00\u81f4\u3002<\/span>\u8fd9\u4e2a\u884c\u4e3a\u4ec5\u4ec5\u53d1\u751f\u5728\u00a0etcdctl member add\u00a0\u5f71\u54cd\u96c6\u7fa4\u548c\u65b0\u6210\u5458\u6210\u529f\u5efa\u7acb\u8fde\u63a5\u5230\u5df2\u6709\u6210\u5458\u7684\u65f6\u95f4\u5185\u3002<\/p>\n<p>\u00a0<\/p>\n<h3><\/h3>\n<h3>1.\u67e5\u770b\u96c6\u7fa4\u72b6\u6001\u00a0 \u83b7\u53d6\u4e3b\u8282\u70b9\u548c\u6545\u969c\u8282\u70b9id<\/h3>\n<p>ETCDCTL_API&#061;3 .\/etcdctl &#8211;cacert&#061;\/etc\/kubernetes\/ssl\/new-ca.pem &#8211;cert&#061;\/etc\/kubernetes\/ssl\/etcd.pem &#8211;key&#061;\/etc\/kubernetes\/ssl\/etcd-key.pem &#8211;endpoints&#061;&#034;https:\/\/192.168.7.132:2379,https:\/\/192.168.7.134:2379,https:\/\/192.168.7.135:2379&#034; endpoint status cluster-health &#8211;write-out&#061;table <\/p>\n<p> ETCDCTL_API&#061;3 .\/etcdctl &#8211;cacert&#061;\/etc\/kubernetes\/ssl\/new-ca.pem &#8211;cert&#061;\/etc\/kubernetes\/ssl\/etcd.pem &#8211;key&#061;\/etc\/kubernetes\/ssl\/etcd-key.pem &#8211;endpoints&#061;&#034;https:\/\/192.168.7.132:2379,https:\/\/192.168.7.134:2379,https:\/\/192.168.7.135:2379&#034; endpoint status cluster-health &#8211;write-out&#061;table <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"300\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250523105227-6830536bb1cf9.png\" width=\"2266\" \/><\/p>\n<p>\u00a0\u67e5\u770b\u6545\u969c\u8282\u70b9<\/p>\n<p>ETCDCTL_API&#061;3 .\/etcdctl &#8211;cacert&#061;\/etc\/kubernetes\/ssl\/new-ca.pem &#8211;cert&#061;\/etc\/kubernetes\/ssl\/etcd.pem &#8211;key&#061;\/etc\/kubernetes\/ssl\/etcd-key.pem &#8211;endpoints&#061;&#034;https:\/\/192.168.7.132:2379,https:\/\/192.168.7.134:2379,https:\/\/192.168.7.135:2379&#034; endpoint<br \/>\n health &#8211;write-out&#061;table <\/p>\n<p> ETCDCTL_API&#061;3 .\/etcdctl &#8211;cacert&#061;\/etc\/kubernetes\/ssl\/new-ca.pem &#8211;cert&#061;\/etc\/kubernetes\/ssl\/etcd.pem &#8211;key&#061;\/etc\/kubernetes\/ssl\/etcd-key.pem &#8211;endpoints&#061;&#034;https:\/\/192.168.7.132:2379,https:\/\/192.168.7.134:2379,https:\/\/192.168.7.135:2379&#034; endpoint<br \/>\n health &#8211;write-out&#061;table <\/p>\n<\/p>\n<h3>2.\u5254\u9664\u6545\u969c\u8282\u70b9\u00a0<\/h3>\n<p>ETCDCTL_API&#061;3 etcdctl &#8211;endpoints&#061;&#034;https:\/\/172.16.169.82:2379&#034; &#8211;cacert&#061;\/etc\/etcd\/ssl\/ca.pem &#8211;cert&#061;\/etc\/etcd\/ssl\/etcd.pem &#8211;key&#061;\/etc\/etcd\/ssl\/etcd-key.pem member remove 971a0fee3d275c5 <\/p>\n<p> ETCDCTL_API&#061;3 etcdctl &#8211;endpoints&#061;&#034;https:\/\/172.16.169.82:2379&#034; &#8211;cacert&#061;\/etc\/etcd\/ssl\/ca.pem &#8211;cert&#061;\/etc\/etcd\/ssl\/etcd.pem &#8211;key&#061;\/etc\/etcd\/ssl\/etcd-key.pem member remove 971a0fee3d275c5<\/p>\n<p>\u9a8c\u8bc1\u662f\u5426\u5254\u9664\u6210\u529f<\/p>\n<p>ETCDCTL_API&#061;3 .\/etcdctl &#8211;cacert&#061;\/etc\/kubernetes\/ssl\/new-ca.pem &#8211;cert&#061;\/etc\/kubernetes\/ssl\/etcd.pem &#8211;key&#061;\/etc\/kubernetes\/ssl\/etcd-key.pem &#8211;endpoints&#061;&#034;https:\/\/192.168.7.132:2379,https:\/\/192.168.7.134:2379,https:\/\/192.168.7.135:2379&#034; member list &#8211;write-out&#061;table <\/p>\n<p> ETCDCTL_API&#061;3 .\/etcdctl &#8211;cacert&#061;\/etc\/kubernetes\/ssl\/new-ca.pem &#8211;cert&#061;\/etc\/kubernetes\/ssl\/etcd.pem &#8211;key&#061;\/etc\/kubernetes\/ssl\/etcd-key.pem &#8211;endpoints&#061;&#034;https:\/\/192.168.7.132:2379,https:\/\/192.168.7.134:2379,https:\/\/192.168.7.135:2379&#034; member list &#8211;write-out&#061;table<\/p>\n<\/p>\n<h3>3.\u91cd\u65b0\u6dfb\u52a0\u6545\u969c\u8282\u70b9<\/h3>\n<h6> 3.1 \u68c0\u67e5\u65e7etcd\u6570\u636e\u5e76\u6e05\u7a7a\u00a0<\/h6>\n<p>rm -rf etcd3.etcd\/ <\/p>\n<p>3.2 \u4fee\u6539\u8981\u52a0\u5165\u96c6\u7fa4etcd3\u7684\u542f\u52a8\u53c2\u6570<\/p>\n<p>vi \/etc\/etcd\/etcd.conf\u5e76\u4fdd\u5b58<br \/>\n\u5c06etcd\u7684&#8211;initial-cluster-state\u542f\u52a8\u53c2\u6570&#xff0c;\u6539\u4e3a&#8211;initial-cluster-state&#061;existing <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"472\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250523105228-6830536c15318.png\" width=\"1361\" \/><\/p>\n<p>3.3 \u4eceetcd-master\u62f7\u8d1d\u8bc1\u4e66<\/p>\n<p>scp -rp etcd1:\/etc\/etcd\/ssl\/ \u00a0\/etc\/etcd\/ <\/p>\n<p>\u62f7\u8d1d\u540e\u68c0\u67e5etcd\u8bc1\u4e66\u6240\u5c5e\u7528\u6237<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"569\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250523105228-6830536c57cb7.png\" width=\"841\" \/><\/p>\n<p>3.4 \u91cd\u65b0\u6dfb\u52a0\u6545\u969c\u8282\u70b9etcd3 \u6ce8\u610f&#xff1a;etcd3\u4e3aetcd.conf\u4e2dETCD_NAME<\/p>\n<p>ETCDCTL_API&#061;3 etcdctl &#8211;endpoints&#061;&#034;https:\/\/172.16.169.82:2379&#034; &#8211;cacert&#061;\/etc\/etcd\/ssl\/ca.pem &#8211;cert&#061;\/etc\/etcd\/ssl\/etcd.pem &#8211;key&#061;\/etc\/etcd\/ssl\/etcd-key.pem \u00a0member add etcd3 &#8211;peer-urls&#061;https:\/\/172.16.169.83:2380<\/p>\n<p>3.5 \u91cd\u542f\u670d\u52a1\u9a8c\u8bc1\u6210\u529f<\/p>\n<p>systemctl daemon-reload systemctl restart etcd<\/p>\n<\/p>\n<h3>\u00a0 \u4e8c. \u5907\u4efd\u6062\u590d\u65b9\u5f0f\u91cd\u505a\u96c6\u7fa4<\/h3>\n<p>\u5907\u6ce8&#xff1a;\u6b64\u65b9\u5f0f\u6709\u53ef\u80fd\u5bfc\u81f4\u6570\u636e\u4e22\u5931&#xff0c;\u4eb2\u8eab\u7ecf\u5386&#xff0c;\u5c3d\u91cf\u4f7f\u7528\u7b2c\u4e00\u79cd\u65b9\u5f0f\u3002<\/p>\n<p>\u5907\u4efdETCD\u96c6\u7fa4\u65f6&#xff0c;\u53ea\u9700\u8981\u5907\u4efd\u4e00\u4e2aETCD\u6570\u636e&#xff0c;\u7136\u540e\u540c\u6b65\u5230\u5176\u4ed6\u8282\u70b9\u4e0a \u6062\u590dETCD\u6570\u636e\u65f6&#xff0c;\u6bcf\u4e2a\u8282\u70b9\u90fd\u8981\u6267\u884c\u6062\u590d\u547d\u4ee4 \u6062\u590d\u987a\u5e8f&#xff1a;\u505c\u6b62kube-apiserver \u2013&gt; \u505c\u6b62ETCD \u2013&gt; \u6062\u590d\u6570\u636e \u2013&gt; \u542f\u52a8ETCD \u2013&gt; \u542f\u52a8kube-apiserve<\/p>\n<p>etcd\u8d44\u6e90\u6587\u4ef6\u5728\/var\/lib\/etcd\u4e0b&#xff0c;\u6709\u4e24\u4e2a\u6587\u4ef6\u5939<\/p>\n<ul>\n<li>snap&#xff1a;\u5b58\u653e\u5feb\u7167\u6570&#xff0c;etcd\u9632\u6b62WAL\u6587\u4ef6\u8fc7\u591a\u800c\u8bbe\u7f6e\u7684\u5feb\u7167&#xff0c;\u5b58\u50a8etcd\u6570\u636e\u72b6\u6001<\/li>\n<li>wal&#xff1a;\u5b58\u653e\u9884\u5199\u5f0f\u65e5\u5fd7,\u6700\u5927\u7684\u4f5c\u7528\u662f\u8bb0\u5f55\u4e86\u6574\u4e2a\u6570\u636e\u53d8\u5316\u7684\u5168\u90e8\u5386\u7a0b\u3002\u5728etcd\u4e2d&#xff0c;\u6240\u6709\u6570\u636e\u7684\u4fee\u6539\u5728\u63d0\u4ea4\u524d&#xff0c;\u90fd\u8981\u5148\u5199\u5165\u5230WAL\u4e2d<\/li>\n<\/ul>\n<p>1\u3001\u67e5\u770b\u5065\u5eb7\u8282\u70b9<\/p>\n<p>ETCDCTL_API&#061;3 \/opt\/etcd\/bin\/etcdctl &#8211;cacert&#061;\/opt\/etcd\/ssl\/etcd-ca.pem &#8211;cert&#061;\/opt\/etcd\/ssl\/server.pem &#8211;key&#061;\/opt\/etcd\/ssl\/server-key.pem &#8211;endpoints&#061;&#034;https:\/\/192.168.15.215:2379,https:\/\/192.168.15.216:2379,https:\/\/192.168.15.217:2379&#034; endpoint health &#8211;write-out&#061;table<\/p>\n<p>2\u3001\u5728\u5065\u5eb7\u8282\u70b9\u4e0a\u5907\u4efdetcd\u6570\u636e<\/p>\n<p>ETCDCTL_API&#061;3 etcdctl snapshot save \u00a0backup.db \\\\<br \/>\n&#8211;cacert&#061;\/opt\/etcd\/ssl\/etcd-ca.pem \\\\<br \/>\n&#8211;cert&#061;\/opt\/etcd\/ssl\/server.pem \\\\<br \/>\n&#8211;key&#061;\/opt\/etcd\/ssl\/server-key.pem \\\\<br \/>\n&#8211;endpoints&#061;&#034;https:\/\/192.168.15.215:2379&#034; <\/p>\n<p>3\u3001\u5c06\u5907\u4efd\u540e\u7684\u6587\u4ef6\u590d\u5236\u5230\u5176\u4ed6etcd\u8282\u70b9\u4e0b<\/p>\n<p>for i in {etcd2,etcd3};do scp backup.db root&#064;i:\/root ;done <\/p>\n<p>4\u3001\u6062\u590detcd\u6570\u636e \u6062\u590d\u4e4b\u524d\u9700\u8981\u5148\u5173\u95edapiserver\u548cetcd&#xff0c;\u5220\u9664etcd\u6570\u636e\u6587\u4ef6<\/p>\n<p>systemctl stop kube-apiserver \u00a0#\u505c\u6b62apiserver<br \/>\nsystemctl stop etcd \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0#\u505c\u6b62etcd<br \/>\nrm -rf opt\/etcd\/data\/* \u00a0 \u00a0 \u00a0 \u00a0 #\u5220\u9664\u6570\u636e\u76ee\u5f55\u6587\u4ef6,\u6839\u636e\u5b9e\u9645\u60c5\u51b5 <\/p>\n<p>\u5728\u8282\u70b91\u6267\u884c\u6062\u590d\u547d\u4ee4&#xff0c;\u5982\u4e0b&#xff1a;<\/p>\n<p>ETCDCTL_API&#061;3 etcdctl snapshot restore backup.db \\\\<br \/>\n&#8211;name etcd-1 \\\\<br \/>\n&#8211;initial-cluster&#061;&#034;etcd-1&#061;https:\/\/192.168.15.215:2380,etcd-2&#061;https:\/\/192.168.15.216:2380,etcd-3&#061;https:\/\/192.168.15.217:2380&#034; \\\\<br \/>\n&#8211;initial-cluster-token&#061;etcd-cluster \\\\<br \/>\n&#8211;initial-advertise-peer-urls&#061;https:\/\/192.168.15.215:2380 \\\\<br \/>\n&#8211;data-dir&#061;\/opt\/etcd\/data <\/p>\n<p>\u5728\u8282\u70b92\u6267\u884c\u6062\u590d\u547d\u4ee4&#xff0c;\u5982\u4e0b&#xff1a;<\/p>\n<p>ETCDCTL_API&#061;3 etcdctl snapshot restore backup.db \\\\<br \/>\n&#8211;name etcd-2 \\\\<br \/>\n&#8211;initial-cluster&#061;&#034;etcd-1&#061;https:\/\/192.168.15.215:2380,etcd-2&#061;https:\/\/192.168.15.216:2380,etcd-3&#061;https:\/\/192.168.15.217:2380&#034; \\\\<br \/>\n&#8211;initial-cluster-token&#061;etcd-cluster \\\\<br \/>\n&#8211;initial-advertise-peer-urls&#061;https:\/\/192.168.15.216:2380 \\\\<br \/>\n&#8211;data-dir&#061;\/opt\/etcd\/data <\/p>\n<p>\u5728\u8282\u70b93\u6267\u884c\u6062\u590d\u547d\u4ee4&#xff0c;\u5982\u4e0b&#xff1a;<\/p>\n<p>ETCDCTL_API&#061;3 etcdctl snapshot restore backup.db \\\\<br \/>\n&#8211;name etcd-3 \\\\<br \/>\n&#8211;initial-cluster&#061;&#034;etcd-1&#061;https:\/\/192.168.15.215:2380,etcd-2&#061;https:\/\/192.168.15.216:2380,etcd-3&#061;https:\/\/192.168.15.217:2380&#034; \\\\<br \/>\n&#8211;initial-cluster-token&#061;etcd-cluster \\\\<br \/>\n&#8211;initial-advertise-peer-urls&#061;https:\/\/192.168.15.217:2380 \\\\<br \/>\n&#8211;data-dir&#061;\/opt\/etcd\/data <\/p>\n<p>\u6062\u590d\u5b8c\u6210\u540e&#xff0c;\u91cd\u542fkube-apiserver\u548cetcd&#xff0c;\u5982\u4e0b&#xff1a;<\/p>\n<p>systemctl start kube-apiserver<br \/>\nsystemctl start etcd <\/p>\n<p>5\u3001\u67e5\u770b\u96c6\u7fa4\u72b6<\/p>\n<p>ETCDCTL_API&#061;3 \/opt\/etcd\/bin\/etcdctl &#8211;cacert&#061;\/opt\/etcd\/ssl\/etcd-ca.pem &#8211;cert&#061;\/opt\/etcd\/ssl\/server.pem &#8211;key&#061;\/opt\/etcd\/ssl\/server-key.pem &#8211;endpoi<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e14\u6b21\uff0c\u6536\u85cf24\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86\u5904\u7406ETCD\u96c6\u7fa4\u6545\u969c\u7684\u6b65\u9aa4\uff0c\u5305\u62ec\u67e5\u770b\u96c6\u7fa4\u72b6\u6001\u3001\u5254\u9664\u6545\u969c\u8282\u70b9\u3001\u91cd\u65b0\u6dfb\u52a0\u6545\u969c\u8282\u70b9\u4ee5\u53ca\u5907\u4efd\u6062\u590d\u96c6\u7fa4\u7684\u65b9\u6cd5\u3002\u9996\u5148\uff0c\u901a\u8fc7etcdctl\u547d\u4ee4\u67e5\u770b\u96c6\u7fa4\u72b6\u6001\uff0c\u8bc6\u522b\u4e3b\u8282\u70b9\u548c\u6545\u969c\u8282\u70b9\u3002\u63a5\u7740\uff0c\u4f7f\u7528member remove\u547d\u4ee4\u5254\u9664\u6545\u969c\u8282\u70b9\uff0c\u5e76\u901a\u8fc7member list\u9a8c\u8bc1\u5254\u9664\u662f\u5426\u6210\u529f\u3002\u968f\u540e\uff0c\u8be6\u7ec6\u8bf4\u660e\u4e86\u91cd\u65b0\u6dfb\u52a0\u6545\u969c\u8282\u70b9\u7684\u6b65\u9aa4\uff0c\u5305\u62ec\u6e05\u7a7a\u65e7\u6570\u636e\u3001\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u3001\u62f7\u8d1d\u8bc1\u4e66\u4ee5\u53ca\u6267\u884cmember add\u547d\u4ee4\u3002\u6700\u540e\uff0c\u6587\u7ae0\u8fd8\u63d0\u4f9b\u4e86\u5907\u4efd\u6062\u590d\u96c6\u7fa4\u7684\u6d41\u7a0b\uff0c\u5f3a\u8c03\u505c\u6b62\u76f8\u5173\u670d\u52a1\u3001\u6062\u590d\u6570\u636e\u540e\u91cd\u542f\u670d\u52a1\u7684\u64cd\u4f5c\u987a\u5e8f\u3002\u901a\u8fc7\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u53ef\u4ee5\u6709\u6548\u7ef4\u62a4ETCD\u96c6\u7fa4\u7684_etcd\u96c6\u7fa4\u8282\u70b9\u6545\u969c\u6062\u590d<\/p>\n","protected":false},"author":2,"featured_media":39469,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1686,120,121],"topic":[],"class_list":["post-39472","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-etcd","tag-kubernetes","tag-121"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Kubernetes etcd \u6545\u969c\u6062\u590d(1) - \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\/39472.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Kubernetes etcd \u6545\u969c\u6062\u590d(1) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e14\u6b21\uff0c\u6536\u85cf24\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86\u5904\u7406ETCD\u96c6\u7fa4\u6545\u969c\u7684\u6b65\u9aa4\uff0c\u5305\u62ec\u67e5\u770b\u96c6\u7fa4\u72b6\u6001\u3001\u5254\u9664\u6545\u969c\u8282\u70b9\u3001\u91cd\u65b0\u6dfb\u52a0\u6545\u969c\u8282\u70b9\u4ee5\u53ca\u5907\u4efd\u6062\u590d\u96c6\u7fa4\u7684\u65b9\u6cd5\u3002\u9996\u5148\uff0c\u901a\u8fc7etcdctl\u547d\u4ee4\u67e5\u770b\u96c6\u7fa4\u72b6\u6001\uff0c\u8bc6\u522b\u4e3b\u8282\u70b9\u548c\u6545\u969c\u8282\u70b9\u3002\u63a5\u7740\uff0c\u4f7f\u7528member remove\u547d\u4ee4\u5254\u9664\u6545\u969c\u8282\u70b9\uff0c\u5e76\u901a\u8fc7member list\u9a8c\u8bc1\u5254\u9664\u662f\u5426\u6210\u529f\u3002\u968f\u540e\uff0c\u8be6\u7ec6\u8bf4\u660e\u4e86\u91cd\u65b0\u6dfb\u52a0\u6545\u969c\u8282\u70b9\u7684\u6b65\u9aa4\uff0c\u5305\u62ec\u6e05\u7a7a\u65e7\u6570\u636e\u3001\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u3001\u62f7\u8d1d\u8bc1\u4e66\u4ee5\u53ca\u6267\u884cmember add\u547d\u4ee4\u3002\u6700\u540e\uff0c\u6587\u7ae0\u8fd8\u63d0\u4f9b\u4e86\u5907\u4efd\u6062\u590d\u96c6\u7fa4\u7684\u6d41\u7a0b\uff0c\u5f3a\u8c03\u505c\u6b62\u76f8\u5173\u670d\u52a1\u3001\u6062\u590d\u6570\u636e\u540e\u91cd\u542f\u670d\u52a1\u7684\u64cd\u4f5c\u987a\u5e8f\u3002\u901a\u8fc7\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u53ef\u4ee5\u6709\u6548\u7ef4\u62a4ETCD\u96c6\u7fa4\u7684_etcd\u96c6\u7fa4\u8282\u70b9\u6545\u969c\u6062\u590d\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/39472.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:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250523105227-6830536bb1cf9.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=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/39472.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/39472.html\",\"name\":\"Kubernetes etcd \u6545\u969c\u6062\u590d(1) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-05-23T10:52:29+00:00\",\"dateModified\":\"2025-05-23T10:52:29+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/39472.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/39472.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/39472.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Kubernetes etcd \u6545\u969c\u6062\u590d(1)\"}]},{\"@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 etcd \u6545\u969c\u6062\u590d(1) - \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\/39472.html","og_locale":"zh_CN","og_type":"article","og_title":"Kubernetes etcd \u6545\u969c\u6062\u590d(1) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e14\u6b21\uff0c\u6536\u85cf24\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86\u5904\u7406ETCD\u96c6\u7fa4\u6545\u969c\u7684\u6b65\u9aa4\uff0c\u5305\u62ec\u67e5\u770b\u96c6\u7fa4\u72b6\u6001\u3001\u5254\u9664\u6545\u969c\u8282\u70b9\u3001\u91cd\u65b0\u6dfb\u52a0\u6545\u969c\u8282\u70b9\u4ee5\u53ca\u5907\u4efd\u6062\u590d\u96c6\u7fa4\u7684\u65b9\u6cd5\u3002\u9996\u5148\uff0c\u901a\u8fc7etcdctl\u547d\u4ee4\u67e5\u770b\u96c6\u7fa4\u72b6\u6001\uff0c\u8bc6\u522b\u4e3b\u8282\u70b9\u548c\u6545\u969c\u8282\u70b9\u3002\u63a5\u7740\uff0c\u4f7f\u7528member remove\u547d\u4ee4\u5254\u9664\u6545\u969c\u8282\u70b9\uff0c\u5e76\u901a\u8fc7member list\u9a8c\u8bc1\u5254\u9664\u662f\u5426\u6210\u529f\u3002\u968f\u540e\uff0c\u8be6\u7ec6\u8bf4\u660e\u4e86\u91cd\u65b0\u6dfb\u52a0\u6545\u969c\u8282\u70b9\u7684\u6b65\u9aa4\uff0c\u5305\u62ec\u6e05\u7a7a\u65e7\u6570\u636e\u3001\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u3001\u62f7\u8d1d\u8bc1\u4e66\u4ee5\u53ca\u6267\u884cmember add\u547d\u4ee4\u3002\u6700\u540e\uff0c\u6587\u7ae0\u8fd8\u63d0\u4f9b\u4e86\u5907\u4efd\u6062\u590d\u96c6\u7fa4\u7684\u6d41\u7a0b\uff0c\u5f3a\u8c03\u505c\u6b62\u76f8\u5173\u670d\u52a1\u3001\u6062\u590d\u6570\u636e\u540e\u91cd\u542f\u670d\u52a1\u7684\u64cd\u4f5c\u987a\u5e8f\u3002\u901a\u8fc7\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u53ef\u4ee5\u6709\u6548\u7ef4\u62a4ETCD\u96c6\u7fa4\u7684_etcd\u96c6\u7fa4\u8282\u70b9\u6545\u969c\u6062\u590d","og_url":"https:\/\/www.wsisp.com\/helps\/39472.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-05-23T10:52:29+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250523105227-6830536bb1cf9.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/39472.html","url":"https:\/\/www.wsisp.com\/helps\/39472.html","name":"Kubernetes etcd \u6545\u969c\u6062\u590d(1) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-05-23T10:52:29+00:00","dateModified":"2025-05-23T10:52:29+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/39472.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/39472.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/39472.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Kubernetes etcd \u6545\u969c\u6062\u590d(1)"}]},{"@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\/39472","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=39472"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/39472\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/39469"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=39472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=39472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=39472"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=39472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}