{"id":1716,"date":"2023-03-26T07:28:05","date_gmt":"2023-03-25T23:28:05","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1716"},"modified":"2023-04-23T21:38:14","modified_gmt":"2023-04-23T13:38:14","slug":"k8s-node-delete","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/26\/k8s-node-delete\/","title":{"rendered":"K8s\u8282\u70b9\u5220\u9664"},"content":{"rendered":"<p>\u4f7f\u7528<code>kubeadm<\/code>\u547d\u4ee4\u5220\u9664\u8282\u70b9<\/p>\n<pre><code>[root@k8s-master ~]# kubectl drain &lt;node name&gt; --delete-local-data --force --ignore-daemonsets\n[root@k8s-master ~]# kubectl delete node &lt;node name&gt;<\/code><\/pre>\n<p><!-- more --><\/p>\n<p>\u7136\u540e\u8282\u70b9\u7aef\u4f7f\u7528<\/p>\n<pre><code>kubeadm reset<\/code><\/pre>\n<pre><code>[root@k8s-node01 ~]# kubeadm reset\n[root@k8s-node01 ~]# systemctl daemon-reload\n[root@k8s-node01 ~]# systemctl restart docker\n[root@k8s-node01 ~]# systemctl restart kubelet<\/code><\/pre>\n<p>\u82e5\u9700\u8981\u91cd\u65b0\u52a0\u5165\uff0c\u5219\u518d\u6b21\u6267\u884c<code>kubeadm join<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528kubeadm\u547d\u4ee4\u5220\u9664\u8282\u70b9 [root@k8s-master ~]# kubectl drain &lt; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[356],"class_list":["post-1716","post","type-post","status-publish","format-standard","hentry","category-k8s","tag-kubernetes"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1716","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1716"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1716\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1716"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1716"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}