{"id":2050,"date":"2025-06-22T16:11:36","date_gmt":"2025-06-22T08:11:36","guid":{"rendered":"http:\/\/113.45.254.23\/?p=2050"},"modified":"2025-06-22T16:11:37","modified_gmt":"2025-06-22T08:11:37","slug":"%e5%88%9b%e5%bb%bak8s%e5%8d%95%e8%8a%82%e7%82%b9%e9%9b%86%e7%be%a4","status":"publish","type":"post","link":"http:\/\/113.45.254.23\/?p=2050","title":{"rendered":"\u521b\u5efak8s\u5355\u8282\u70b9\u96c6\u7fa4\u00a0"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u5b9e\u9a8c\u73af\u5883\uff1a6\u53f0Rocky Linux\u865a\u62df\u673a<\/h2>\n\n\n\n<p>192.168.7.180 master1<\/p>\n\n\n\n<p>192.168.7.181 master2<\/p>\n\n\n\n<p>192.168.7.182 master3<\/p>\n\n\n\n<p>192.168.7.183 node1<\/p>\n\n\n\n<p>192.168.7.184 node2<\/p>\n\n\n\n<p>192.168.7.185 nfs<\/p>\n\n\n\n<p>\u5185\u5b58\uff1a8G\u3001\u5904\u7406\u5668\uff1a4\u6838\u3001\u7f51\u5361\uff1aVMnet8<\/p>\n\n\n\n<p>\u4fee\u6539\u7f51\u5361\u4fe1\u606f\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-144.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"99\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-144.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2051\"  sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-145.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"481\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-145.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2052\"  sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-146.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"445\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-146.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2053\"  sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u4fee\u6539hosts\u6587\u4ef6<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@1-5 ~]# vim \/etc\/hosts\t\t\u4fee\u6539hosts\u6587\u4ef6\n\u6dfb\u52a0\u6240\u6709\u8282\u70b9IP\u5730\u5740\u4e0e\u8ba1\u7b97\u673a\u540d\u4e4b\u95f4\u7684\u6620\u5c04\n192.168.7.180 master1\n192.168.7.181 master2\n192.168.7.182 master3\n192.168.7.183 node1\n192.168.7.184 node2<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u65f6\u95f4\u540c\u6b65\uff1a<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1-5 ~]# vim \/etc\/chrony.conf\t\t\u7f16\u8f91\u65f6\u95f4\u540c\u6b65\u914d\u7f6e\u6587\u4ef6\n#pool 2.rocky.pool.ntp.org iburst\npool ntp.aliyun.com iburst\n&#91;root@1-5 ~]# systemctl enable --now chronyd\n&#91;root@1-5 ~]# chronyc sources -v\n\n  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.\n \/ .- Source state '*' = current best, '+' = combined, '-' = not combined,\n| \/             'x' = may be in error, '~' = too variable, '?' = unusable.\n||                                                 .- xxxx &#91; yyyy ] +\/- zzzz\n||      Reachability register (octal) -.           |  xxxx = adjusted offset,\n||      Log2(Polling interval) --.      |          |  yyyy = measured offset,\n||                                \\     |          |  zzzz = estimated error.\n||                                 |    |           \\\nMS Name\/IP address         Stratum Poll Reach LastRx Last sample\n===============================================================================\n^+ mail.moe.cat                  2   6    77    43    +16ms&#91;  +16ms] +\/-   95ms\n^- a.chl.la                      2   6    77    43    +69ms&#91;  +69ms] +\/-  161ms\n^- 139.199.215.251               2   6    75    41  +2266us&#91;+2266us] +\/-   63ms\n^* tock.ntp.infomaniak.ch        1   6    77    44  -9399us&#91;  -16ms] +\/-   91ms\n&#91;root@master1 ~]# date\n2025\u5e74 06\u6708 19\u65e5 \u661f\u671f\u56db 14:23:23 CST\n&#91;root@1-5 ~]# clock -w\n&#91;root@1-5 ~]#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001\u6d4b\u8bd5\u7f51\u7edc\u8fde\u901a\u6027\uff1a<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 ~]# ping master2\nPING master2 (192.168.7.181) 56(84) \u6bd4\u7279\u7684\u6570\u636e\u3002\n64 \u6bd4\u7279\uff0c\u6765\u81ea master2 (192.168.7.181): icmp_seq=1 ttl=64 \u65f6\u95f4=1.20 \u6beb\u79d2\n64 \u6bd4\u7279\uff0c\u6765\u81ea master2 (192.168.7.181): icmp_seq=2 ttl=64 \u65f6\u95f4=0.370 \u6beb\u79d2\n64 \u6bd4\u7279\uff0c\u6765\u81ea master2 (192.168.7.181): icmp_seq=3 ttl=64 \u65f6\u95f4=1.37 \u6beb\u79d2\n64 \u6bd4\u7279\uff0c\u6765\u81ea master2 (192.168.7.181): icmp_seq=4 ttl=64 \u65f6\u95f4=0.693 \u6beb\u79d2\n64 \u6bd4\u7279\uff0c\u6765\u81ea master2 (192.168.7.181): icmp_seq=5 ttl=64 \u65f6\u95f4=0.798 \u6beb\u79d2\n^C\n--- master2 ping \u7edf\u8ba1 ---\n\u5df2\u53d1\u9001 5 \u4e2a\u5305\uff0c \u5df2\u63a5\u6536 5 \u4e2a\u5305, 0% packet loss, time 4076ms\nrtt min\/avg\/max\/mdev = 0.370\/0.885\/1.369\/0.358 ms\n&#91;root@master1 ~]# ping master3\nPING master3 (192.168.7.182) 56(84) \u6bd4\u7279\u7684\u6570\u636e\u3002\n64 \u6bd4\u7279\uff0c\u6765\u81ea master3 (192.168.7.182): icmp_seq=1 ttl=64 \u65f6\u95f4=0.936 \u6beb\u79d2\n64 \u6bd4\u7279\uff0c\u6765\u81ea master3 (192.168.7.182): icmp_seq=2 ttl=64 \u65f6\u95f4=0.433 \u6beb\u79d2\n64 \u6bd4\u7279\uff0c\u6765\u81ea master3 (192.168.7.182): icmp_seq=3 ttl=64 \u65f6\u95f4=1.06 \u6beb\u79d2\n64 \u6bd4\u7279\uff0c\u6765\u81ea master3 (192.168.7.182): icmp_seq=4 ttl=64 \u65f6\u95f4=0.977 \u6beb\u79d2\n64 \u6bd4\u7279\uff0c\u6765\u81ea master3 (192.168.7.182): icmp_seq=5 ttl=64 \u65f6\u95f4=0.501 \u6beb\u79d2\n^C\n--- master3 ping \u7edf\u8ba1 ---\n\u5df2\u53d1\u9001 5 \u4e2a\u5305\uff0c \u5df2\u63a5\u6536 5 \u4e2a\u5305, 0% packet loss, time 4007ms\nrtt min\/avg\/max\/mdev = 0.433\/0.780\/1.057\/0.260 ms\n&#91;root@master1 ~]# ping node1\nPING node1 (192.168.7.183) 56(84) \u6bd4\u7279\u7684\u6570\u636e\u3002\n64 \u6bd4\u7279\uff0c\u6765\u81ea node1 (192.168.7.183): icmp_seq=1 ttl=64 \u65f6\u95f4=0.893 \u6beb\u79d2\n64 \u6bd4\u7279\uff0c\u6765\u81ea node1 (192.168.7.183): icmp_seq=2 ttl=64 \u65f6\u95f4=1.28 \u6beb\u79d2\n64 \u6bd4\u7279\uff0c\u6765\u81ea node1 (192.168.7.183): icmp_seq=3 ttl=64 \u65f6\u95f4=0.552 \u6beb\u79d2\n^C\n--- node1 ping \u7edf\u8ba1 ---\n\u5df2\u53d1\u9001 3 \u4e2a\u5305\uff0c \u5df2\u63a5\u6536 3 \u4e2a\u5305, 0% packet loss, time 2004ms\nrtt min\/avg\/max\/mdev = 0.552\/0.908\/1.280\/0.297 ms\n&#91;root@master1 ~]# ping node2\nPING node2 (192.168.7.184) 56(84) \u6bd4\u7279\u7684\u6570\u636e\u3002\n64 \u6bd4\u7279\uff0c\u6765\u81ea node2 (192.168.7.184): icmp_seq=1 ttl=64 \u65f6\u95f4=1.29 \u6beb\u79d2\n64 \u6bd4\u7279\uff0c\u6765\u81ea node2 (192.168.7.184): icmp_seq=2 ttl=64 \u65f6\u95f4=0.732 \u6beb\u79d2\n64 \u6bd4\u7279\uff0c\u6765\u81ea node2 (192.168.7.184): icmp_seq=3 ttl=64 \u65f6\u95f4=0.964 \u6beb\u79d2\n64 \u6bd4\u7279\uff0c\u6765\u81ea node2 (192.168.7.184): icmp_seq=4 ttl=64 \u65f6\u95f4=1.15 \u6beb\u79d2\n^C\n--- node2 ping \u7edf\u8ba1 ---\n\u5df2\u53d1\u9001 4 \u4e2a\u5305\uff0c \u5df2\u63a5\u6536 4 \u4e2a\u5305, 0% packet loss, time 3005ms\nrtt min\/avg\/max\/mdev = 0.732\/1.034\/1.293\/0.209 ms\n&#91;root@master1 ~]#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e94\uff1amaster1\u3001master2\u3001master3\u3001node1\u3001node2\u751f\u6210ssh\u7684\u52a0\u5bc6\u5bc6\u94a5\u3001\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 ~]# ssh-keygen -t rsa\t\u751f\u6210ssh\u7684\u52a0\u5bc6\u5bc6\u94a5\n&#91;root@master1 ~]# ssh-copy-id master1\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'master1 (192.168.7.180)' can't be established.\nED25519 key fingerprint is SHA256:X5l9j\/odE9JMqd6\/MA7PU+pSLto0sPgfcwoBs31lZfs.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@master1's password:  123.com\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'master1'\"\nand check to make sure that only the key(s) you wanted were added.\n&#91;root@master1 ~]# ssh-copy-id master2\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'master2 (192.168.7.181)' can't be established.\nED25519 key fingerprint is SHA256:xUDA0O+t2CzJjkoXTnPz4uWZHLsBka7X2jWeyssMSNo.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@master2's password:\t\t123.com\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'master2'\"\nand check to make sure that only the key(s) you wanted were added.\n&#91;root@master1 ~]# ssh-copy-id master3\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'master3 (192.168.7.182)' can't be established.\nED25519 key fingerprint is SHA256:kpAkPYXaD3AdmsYgZR5c8e2s0UFQmdjt7McDwERJazQ.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@master3's password:\t\t123.com\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'master3'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@master1 ~]# ssh-copy-id node1\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'node1 (192.168.7.183)' can't be established.\nED25519 key fingerprint is SHA256:H7LflkvVNKIcCNphIsXrJ2ZYRLIzz7\/o4GDGtjBBKW0.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@node1's password:\t\t123.com\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'node1'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@master1 ~]# ssh-copy-id node2\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'node2 (192.168.7.184)' can't be established.\nED25519 key fingerprint is SHA256:yTWe87DXauVvVHROeEgV3ixkCjKnp1Jr1oEsQBL6nOc.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@node2's password:\t\t123.com\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'node2'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@master1 ~]#\n\n\n\n\n\n\n\n&#91;root@master2 ~]# ssh-keygen -t rsa\t\u751f\u6210ssh\u7684\u52a0\u5bc6\u5bc6\u94a5\nGenerating public\/private rsa key pair.\nEnter file in which to save the key (\/root\/.ssh\/id_rsa):\nEnter passphrase (empty for no passphrase):\nEnter same passphrase again:\nYour identification has been saved in \/root\/.ssh\/id_rsa\nYour public key has been saved in \/root\/.ssh\/id_rsa.pub\nThe key fingerprint is:\nSHA256:7KOPhelxQC4S4YoXYaNIL4bxA3HZ3OXzp+ZS108hVg8 root@master2\nThe key's randomart image is:\n+---&#91;RSA 3072]----+\n|+o*+ . ..        |\n|+Oo+o ..      E. |\n|+o*.  . o     ...|\n|o..+ o . o   o ..|\n|o o . o S . o.. .|\n| . . . =  .o. . .|\n|      + =.o.   o |\n|     . *.+      .|\n|      +....      |\n+----&#91;SHA256]-----+\n&#91;root@master2 ~]# ssh-copy-id master1\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'master1 (192.168.7.180)' can't be established.\nED25519 key fingerprint is SHA256:X5l9j\/odE9JMqd6\/MA7PU+pSLto0sPgfcwoBs31lZfs.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@master1's password:\t\t123.com\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'master1'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@master2 ~]# ssh-copy-id master2\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'master2 (192.168.7.181)' can't be established.\nED25519 key fingerprint is SHA256:xUDA0O+t2CzJjkoXTnPz4uWZHLsBka7X2jWeyssMSNo.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@master2's password:\t\t123.com\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'master2'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@master2 ~]# ssh-copy-id master3\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'master3 (192.168.7.182)' can't be established.\nED25519 key fingerprint is SHA256:kpAkPYXaD3AdmsYgZR5c8e2s0UFQmdjt7McDwERJazQ.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@master3's password:\t\t123.com\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'master3'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@master2 ~]# ssh-copy-id node1\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'node1 (192.168.7.183)' can't be established.\nED25519 key fingerprint is SHA256:H7LflkvVNKIcCNphIsXrJ2ZYRLIzz7\/o4GDGtjBBKW0.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@node1's password:\t\t123.com\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'node1'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@master2 ~]# ssh-copy-id node2\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'node2 (192.168.7.184)' can't be established.\nED25519 key fingerprint is SHA256:yTWe87DXauVvVHROeEgV3ixkCjKnp1Jr1oEsQBL6nOc.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@node2's password:\t\t123.com\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'node2'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@master2 ~]#\n&#91;root@master3 ~]# ssh-keygen -t rsa\t\u751f\u6210ssh\u7684\u52a0\u5bc6\u5bc6\u94a5\nGenerating public\/private rsa key pair.\nEnter file in which to save the key (\/root\/.ssh\/id_rsa):\nEnter passphrase (empty for no passphrase):\nEnter same passphrase again:\nYour identification has been saved in \/root\/.ssh\/id_rsa\nYour public key has been saved in \/root\/.ssh\/id_rsa.pub\nThe key fingerprint is:\nSHA256:yozcLvGRPIfqlHKcU+dgZh0JDypgBD7sqIGDbSAJBy8 root@master3\nThe key's randomart image is:\n+---&#91;RSA 3072]----+\n|B+.   o          |\n|==   . + .       |\n|E+o .   +        |\n|*+..   . .       |\n|*.o  .*oS        |\n|.+ o.%*=.        |\n|. . X+=+.        |\n|   +oo.          |\n|   ....          |\n+----&#91;SHA256]-----+\n&#91;root@master3 ~]# ssh-copy-id master1\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'master1 (192.168.7.180)' can't be established.\nED25519 key fingerprint is SHA256:X5l9j\/odE9JMqd6\/MA7PU+pSLto0sPgfcwoBs31lZfs.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@master1's password:\t\t123.com\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'master1'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@master3 ~]# ssh-copy-id master2\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'master2 (192.168.7.181)' can't be established.\nED25519 key fingerprint is SHA256:xUDA0O+t2CzJjkoXTnPz4uWZHLsBka7X2jWeyssMSNo.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@master2's password:\t\t123.com\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'master2'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@master3 ~]# ssh-copy-id master3\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'master3 (192.168.7.182)' can't be established.\nED25519 key fingerprint is SHA256:kpAkPYXaD3AdmsYgZR5c8e2s0UFQmdjt7McDwERJazQ.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@master3's password:\t\t123.com\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'master3'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@master3 ~]# ssh-copy-id node1\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'node1 (192.168.7.183)' can't be established.\nED25519 key fingerprint is SHA256:H7LflkvVNKIcCNphIsXrJ2ZYRLIzz7\/o4GDGtjBBKW0.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@node1's password:\t\t123.com\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'node1'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@master3 ~]# ssh-copy-id node2\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'node2 (192.168.7.184)' can't be established.\nED25519 key fingerprint is SHA256:yTWe87DXauVvVHROeEgV3ixkCjKnp1Jr1oEsQBL6nOc.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@node2's password:\t\t123.com\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'node2'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@master3 ~]#\n\n\n&#91;root@node1 ~]# ssh-keygen -t rsa\t\u751f\u6210ssh\u7684\u52a0\u5bc6\u5bc6\u94a5\nGenerating public\/private rsa key pair.\nEnter file in which to save the key (\/root\/.ssh\/id_rsa):\nEnter passphrase (empty for no passphrase):\nEnter same passphrase again:\nYour identification has been saved in \/root\/.ssh\/id_rsa\nYour public key has been saved in \/root\/.ssh\/id_rsa.pub\nThe key fingerprint is:\nSHA256:thkWoq\/KYFiHUjAHTmrjH1CMn3Cv2b\/+6jIeKPA1748 root@node1\nThe key's randomart image is:\n+---&#91;RSA 3072]----+\n|+o+.             |\n|+*.o             |\n|.== o . .        |\n|o.o+ o . .       |\n|o.o.O   S        |\n|o+.=o= o +       |\n|oo.o .+ o        |\n|.o.  =.o         |\n|  o.o.E*=.       |\n+----&#91;SHA256]-----+\n&#91;root@node1 ~]# ssh-copy-id master1\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'master1 (192.168.7.180)' can't be established.\nED25519 key fingerprint is SHA256:X5l9j\/odE9JMqd6\/MA7PU+pSLto0sPgfcwoBs31lZfs.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@master1's password:\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'master1'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@node1 ~]# ssh-copy-id master2\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'master2 (192.168.7.181)' can't be established.\nED25519 key fingerprint is SHA256:xUDA0O+t2CzJjkoXTnPz4uWZHLsBka7X2jWeyssMSNo.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@master2's password:\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'master2'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@node1 ~]# ssh-copy-id master3\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'master3 (192.168.7.182)' can't be established.\nED25519 key fingerprint is SHA256:kpAkPYXaD3AdmsYgZR5c8e2s0UFQmdjt7McDwERJazQ.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@master3's password:\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'master3'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@node1 ~]# ssh-copy-id node1\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'node1 (192.168.7.183)' can't be established.\nED25519 key fingerprint is SHA256:H7LflkvVNKIcCNphIsXrJ2ZYRLIzz7\/o4GDGtjBBKW0.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@node1's password:\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'node1'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@node1 ~]# ssh-copy-id node2\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'node2 (192.168.7.184)' can't be established.\nED25519 key fingerprint is SHA256:yTWe87DXauVvVHROeEgV3ixkCjKnp1Jr1oEsQBL6nOc.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@node2's password:\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'node2'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@node1 ~]#\n\n&#91;root@node2 ~]# ssh-keygen -t rsa\t\u751f\u6210ssh\u7684\u52a0\u5bc6\u5bc6\u94a5\nGenerating public\/private rsa key pair.\nEnter file in which to save the key (\/root\/.ssh\/id_rsa):\nEnter passphrase (empty for no passphrase):\nEnter same passphrase again:\nYour identification has been saved in \/root\/.ssh\/id_rsa\nYour public key has been saved in \/root\/.ssh\/id_rsa.pub\nThe key fingerprint is:\nSHA256:N2x\/BQcsSiYDn8xLmrQG8ET73b1n4OzZ4Qd2wKJt9Yg root@node2\nThe key's randomart image is:\n+---&#91;RSA 3072]----+\n|  ..o ..     ..  |\n|   + . +o.o . .. |\n|    + . *= . o. .|\n|     + * +... +o |\n|      * S *oo+ +.|\n|     .   o.=Eo+.o|\n|           .=.=o |\n|           . B ..|\n|            o o. |\n+----&#91;SHA256]-----+\n&#91;root@node2 ~]# ssh-copy-id master1\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'master1 (192.168.7.180)' can't be established.\nED25519 key fingerprint is SHA256:X5l9j\/odE9JMqd6\/MA7PU+pSLto0sPgfcwoBs31lZfs.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@master1's password:\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'master1'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@node2 ~]# ssh-copy-id master2\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'master2 (192.168.7.181)' can't be established.\nED25519 key fingerprint is SHA256:xUDA0O+t2CzJjkoXTnPz4uWZHLsBka7X2jWeyssMSNo.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@master2's password:\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'master2'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@node2 ~]# ssh-copy-id master3\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'master3 (192.168.7.182)' can't be established.\nED25519 key fingerprint is SHA256:kpAkPYXaD3AdmsYgZR5c8e2s0UFQmdjt7McDwERJazQ.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@master3's password:\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'master3'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@node2 ~]# ssh-copy-id node1\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'node1 (192.168.7.183)' can't be established.\nED25519 key fingerprint is SHA256:H7LflkvVNKIcCNphIsXrJ2ZYRLIzz7\/o4GDGtjBBKW0.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@node1's password:\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'node1'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@node2 ~]#\n&#91;root@node2 ~]# ssh-copy-id node2\t\t\u5c06\u672c\u5730\u751f\u6210\u7684\u5bc6\u94a5\u6587\u4ef6\u548c\u79c1\u94a5\u6587\u4ef6\u62f7\u8d1d\u5230\u8fdc\u7a0b\u4e3b\u673a\u91cc\u6240\u6709\u8282\u70b9\u64cd\u4f5c\uff08\u76ee\u7684\u662f\uff1a\u4e3b\u673a\u4e4b\u95f4\u65e0\u5bc6\u94a5\u767b\u5f55\uff09\n\/usr\/bin\/ssh-copy-id: INFO: Source of key(s) to be installed: \"\/root\/.ssh\/id_rsa.pub\"\nThe authenticity of host 'node2 (192.168.7.184)' can't be established.\nED25519 key fingerprint is SHA256:yTWe87DXauVvVHROeEgV3ixkCjKnp1Jr1oEsQBL6nOc.\nThis key is not known by any other names\nAre you sure you want to continue connecting (yes\/no\/&#91;fingerprint])? yes\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys\nroot@node2's password: \n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh 'node2'\"\nand check to make sure that only the key(s) you wanted were added.\n\n&#91;root@node2 ~]# <\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u516d\u3001\u5173\u95ed\u4ea4\u6362\u5206\u533a\uff1a<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@1-5 ~]# swapoff -a\t\t\u4e34\u65f6\u5173\u95ed\u4ea4\u6362\u5206\u533a\n&#91;root@master1 ~]#\n&#91;root@1-5 ~]# vim \/etc\/fstab\t\u6c38\u4e45\u5173\u95ed\u4ea4\u6362\u5206\u533a\uff08\u5173\u95ed\u4ea4\u6362\u5206\u533a\u7684\u76ee\u7684\uff1a\u5982\u679c\u4e0d\u5173\u95ed\u4ea4\u6362\u5206\u533a\uff0c\u5f71\u54cdK8s\u6027\u80fd\uff09\n#\/dev\/mapper\/rl_server10-swap none                    swap    defaults        0 0\n~<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e03\u3001\u4fee\u6539\u5185\u6838\u53c2\u6570\uff1a<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@1-5 ~]#cat > \/etc\/modules-load.d\/k8s.conf &lt;&lt;EOF \t\t\t\u4fee\u6539\u5185\u6838\u53c2\u6570\n> overlay\t\t\toverlay\t\u662fK8s\u5b9e\u73b0\u8de8\u754c\u70b9\u901a\u4fe1\u7684\u6838\u5fc3\u673a\u5236\n> br_netfilter\n> EOF\n\n&#91;root@1-5 ~]# sudo modprobe overlay\t\u8ba9\u7cfb\u7edf\u91cd\u65b0\u52a0\u8f7d\u5185\u6838\n&#91;root@1-5 ~]# sudo modprobe br_netfilter\n&#91;root@1-5~]#<\/code><\/pre>\n\n\n\n<p>\u516b\u3001<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@1-5 ~]cat > \/etc\/sysctl.d\/k8s.conf &lt;&lt;EOF\nnet.bridge.bridge-nf-call-ip6tables = 1\t\u5c06linux\u6865\u63a5\u6d41\u91cf\u8f6c\u53d1\uff08\u4e0a\u8fb9ipv6,\u4e0b\u8fb9ipv4\uff09\nnet.bridge.bridge-nf-call-iptables = 1\nnet.ipv4.ip_forward = 1\t\t\u542f\u7528\u5185\u6838\u7684IP\u8f6c\u53d1\u529f\u80fd\uff0c\u5141\u8bb8\u5bb9\u5668\u8de8\u754c\u70b9\u901a\u4fe1\nvm.swappiness=0\t\t\t\u7981\u6b62\u5185\u6838\u4f7f\u7528\u4ea4\u6362\u5206\u533a\nvm.overcommit_memory = 0\t\t\u542f\u7528\u4e25\u683c\u7684\u5185\u5b58\u5206\u914d\u7b56\u7565\nEOF<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u3001\u7acb\u5373\u751f\u6548<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1-5 ~]# sysctl -p \/etc\/sysctl.d\/k8s.conf\t\t\u7acb\u5373\u751f\u6548\n\nnet.bridge.bridge-nf-call-ip6tables = 1\nnet.bridge.bridge-nf-call-iptables = 1\nnet.ipv4.ip_forward = 1\nvm.swappiness = 0\nvm.overcommit_memory = 0\n&#91;root@1-5~]#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u4e00\u3001\u5b89\u88c5lvs\u3001\u521b\u5efaLvs\u7684\u5355\u5143\u914d\u7f6e\u6587\u4ef6\u3001\u8fd0\u884c\u914d\u7f6e\u6587\u4ef6\u5e76\u8fc7\u6ee4Ipvs\uff0c\u770b\u4ed6\u662f\u5426\u52a0\u8f7d\u4e86\u5185\u6838\u6a21\u5757<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@1-5~]# dnf -y install ipvsadm ipset\t\u5b89\u88c5lvs  ipvsadm\u7528\u4e8e\u7ba1\u7406ipvs\u89c4\u5219\uff1bipset\u7528\u4e8e\u9ad8\u6548\u5904\u7406\u96c6\u5408<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 -5~]# mkdir \/etc\/sysconfig\/modules -p\t\u521b\u5efa\u5355\u5143\u76ee\u5f55\n&#91;root@master1 -5 ~]# cat > \/etc\/sysconfig\/modules\/ipvs.modules &lt;&lt;EOF\t\t\u521b\u5efaLvs\u7684\u5355\u5143\u914d\u7f6e\u6587\u4ef6\n#!\/bin\/bash\nmodprobe -- ip_vs\tIP\u865a\u62df\u670d\u52a1\u7684\u6838\u5fc3\u6a21\u5757\nmodprobe -- ip_vs_rr\t\u52a0\u8f7dLvs\u7b97\u6cd5 \u8f6e\u8be2\nmodprobe -- ip_vs_wrr\t\u52a0\u8f7dLvs\u7b97\u6cd5\t\u52a0\u6743\u8f6e\u8be2\nmodprobe -- ip_vs_sh\t\u52a0\u8f7dLvs\u7b97\u6cd5\t\u6e90\u54c8\u5e0c\u8c03\u5ea6\u7b97\u6cd5\nmodprobe -- nf_conntrack\t\u52a0\u8f7d\u7f51\u7edc\u8fde\u63a5\u8ddf\u8e2a\u6a21\u5757\t\t\t\t\t\t\t\t\u4ee5\u4e0a\u90fd\u662f \u521b\u5efaLvs\u7684\u5355\u5143\u914d\u7f6e\u6587\u4ef6\nEOF\n&#91;root@master1 -5 ~]# chmod 755 \/etc\/sysconfig\/modules\/ipvs.modules\t\t\u7ed9\u914d\u7f6e\u6587\u4ef6\u6dfb\u52a0755\u6743\u9650\n&#91;root@master1 -5 ~]# bash \/etc\/sysconfig\/modules\/ipvs.modules &amp;&amp; lsmod | grep -e ip_vs -e nf_conntrack\t\t\u8fd0\u884c\u914d\u7f6e\u6587\u4ef6\u5e76\u8fc7\u6ee4Ipvs\uff0c\u770b\u4ed6\u662f\u5426\u52a0\u8f7d\u4e86\u5185\u6838\u6a21\u5757\nip_vs_sh               16384  0\nip_vs_wrr              16384  0\nip_vs_rr               16384  0<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u4e8c\u3001\u5b89\u88c5yum\u63d2\u4ef6<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@1-5 ~]# yum install yum-utils\t\t\u5b89\u88c5yum\u63d2\u4ef6<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u4e09\u3001\u4e0b\u8f7d\u963f\u91cc\u4e91\u4e0b\u7684docker\u6570\u636e\u6e90<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@1-5 ~]# yum-config-manager --add-repo https:\/\/mirrors.aliyun.com\/docker-ce\/linux\/centos\/docker-ce.repo\t\u4e0b\u8f7d\u963f\u91cc\u4e91\u4e0b\u7684docker\u6570\u636e\u6e90\n\u6dfb\u52a0\u4ed3\u5e93\u81ea\uff1ahttps:\/\/mirrors.aliyun.com\/docker-ce\/linux\/centos\/docker-ce.repo\n&#91;root@master1 -5~]#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u56db\u3001\u5b89\u88c5\u5bb9\u5668\u8fd0\u884c\u65f6<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 -5~]# yum install containerd -y \u5b89\u88c5\u5bb9\u5668\u8fd0\u884c\u65f6<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u4e94\u3001\u91cd\u65b0\u751f\u6210\u9ed8\u8ba4\u7684\u5bb9\u5668\u8fd0\u884c\u65f6\u914d\u7f6e\u6587\u4ef6<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 -5~]# containerd config default > \/etc\/containerd\/config.toml \u91cd\u65b0\u751f\u6210\u9ed8\u8ba4\u7684\u5bb9\u5668\u8fd0\u884c\u65f6\u914d\u7f6e\u6587\u4ef6<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u516d\u3001\u7f16\u8f91\u5bb9\u5668\u8fd0\u884c\u65f6\u914d\u7f6e\u6587\u4ef6<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 -5~]# vim \/etc\/containerd\/config.toml\t\t\u7f16\u8f91\u5bb9\u5668\u8fd0\u884c\u65f6\u914d\u7f6e\u6587\u4ef6\n67     sandbox_image = \"registry.aliyuncs.com\/google_containers\/pause:3.9\"\t\u4fee\u6539pause\u955c\u50cf\u5730\u5740;\u6dfb\u52a0\u963f\u91cc\u4e91\u4e0b\u7684pause:3.9\u955c\u50cf\u5730\u5740\n139             SystemdCgroup = true\t\u8868\u793a\u5c06\u5bb9\u5668\u8fd0\u884c\u65f6\u63a7\u5236\u7ec4\u8bbe\u7f6e\u4e3asystemd\u6765\u8fdb\u884c\u7ba1\u7406\n&#91;root@1-5~]# systemctl daemon-reload\t\t\u91cd\u65b0\u52a0\u8f7d\u7cfb\u7edf\u8fdb\u7a0b\n&#91;root@1-5 ~]# systemctl enable --now containerd.service\t\u542f\u52a8\u5bb9\u5668\u8fd0\u884c\u65f6\uff0c\u5e76\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/containerd.service \u2192 \/usr\/lib\/systemd\/system\/containerd.service.\n&#91;root@1-5 ~]# shutdown -h now<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u4e03\u3001Master1-3,node1\u30012\u62cd\u6444\u5feb\u7167<\/h2>\n\n\n\n<p>\u5feb\u7167\u540d\u79f0\uff1a\u73af\u5883\u914d\u7f6e\u5b8c\u6210<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-147.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"450\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-147.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2054\"  sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u516b\u3001\u521b\u5efak8s\u963f\u91cc\u4e91\u4e0b\u7684\u6570\u636e\u6e90<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@1-5~]# cat >  \/etc\/yum.repos.d\/kubernetes.repo &lt;&lt;EOF\t\t\u521b\u5efak8s\u963f\u91cc\u4e91\u4e0b\u7684\u6570\u636e\u6e90\n&#91;kubernetes]\nname=Kubernetes\nbaseurl=https:\/\/mirrors.aliyun.com\/kubernetes-new\/core\/stable\/v1.30\/rpm\/\nenabled=1\ngpgcheck=1\ngpgkey=https:\/\/mirrors.aliyun.com\/kubernetes-new\/core\/stable\/v1.30\/rpm\/repodata\/repomd.xml.key\nEOF<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5341\u4e5d\u3001\u6e05\u7a7aDNF\u7f13\u5b58\u3001\u91cd\u65b0\u751f\u6210DNF\u7f13\u5b58<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@1-5 ~]# dnf clean all\t\t\u6e05\u7a7aDNF\u7f13\u5b58\n32 \u4e2a\u6587\u4ef6\u5df2\u5220\u9664\n&#91;root@1-5 ~]# dnf makecache\t\u91cd\u65b0\u751f\u6210DNF\u7f13\u5b580\nDocker CE Stable - x86_64 <\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u5341\u3001\u5b89\u88c5k8s<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@1-5 ~]# dnf -y install kubelet-1.30.0 kubeadm-1.30.0 kubectl-1.30.0\t  \u5b89\u88c5k8s<\/code><\/pre>\n\n\n\n<p>kubelet\u7684\u4f5c\u7528\uff1a\u7528\u4e8e\u542f\u52a8pod(\u5bb9\u5668\u7684\u96c6\u5408)\uff0c\u53ea\u8981pod\u542f\u52a8\u5c31\u9700\u8981kubelet\u7684\u547d\u4ee4<\/p>\n\n\n\n<p>kubeadm\u7684\u4f5c\u7528\uff1a\u7528\u6765\u521d\u59cb\u5316k8s\u96c6\u7fa4\uff0c<\/p>\n\n\n\n<p>kubectl\u7684\u4f5c\u7528\uff1a\u7528\u6765\u90e8\u7f72\u548c\u7ba1\u7406\u5e94\u7528\uff0c\u67e5\u770b\u5404\u79cd\u8d44\u6e90\uff0c\u521b\u5efa\u548c\u5220\u9664\uff0c\u66f4\u65b0\u5404\u79cd\u7ec4\u4ef6<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u5341\u4e00\u3001master1\u4e0a\u7f16\u8f91\u521d\u59cb\u5316k8s\u96c6\u7fa4<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 ~]# kubeadm config print init-defaults > kubeadm.yaml\n&#91;root@master1 ~]# ls\nanaconda-ks.cfg  kubeadm.yaml\n&#91;root@master1 ~]# vim kubeadm.yaml\t\tvim kubeadm.yaml\uff08\u53ea\u5728master\u4e0a\u64cd\u4f5c\uff0c\u5176\u4ed6\u673a\u5668\u4e0a\u4e0d\u64cd\u4f5c\uff09\n12   advertiseAddress: 192.168.7.180\t\t\u63a7\u5236\u8282\u70b9IP\uff1a7.180\n 15   criSocket: unix:\/\/\/run\/containerd\/containerd.sock\t\u6307\u5b9a\u5bb9\u5668\u8fd0\u884c\u65f6\u5177\u4f53\u547d\u4ee4\u7684\u4f4d\u7f6e\n17   name: master1\t\t\t\t\u4e3b\u8282\u70b9\u7684\u8ba1\u7b97\u673a\u540d\n30 imageRepository: registry.cn-hangzhou.aliyuncs.com\/google_containers\t\u963f\u91cc\u4e91\u7684\u955c\u50cf\u4ed3\u5e93\u5730\u5740\n35   podSubnet: 10.244.0.0\/16\t\t\t\t\u589e\u52a0\u7684pod\u7f51\u6bb5\n---\napiVersion: kubeproxy.config.k8s.io\/v1alpha1\nkind: KubeProxyConfiguration\nmode: ipvs\n---\napiVersion: kubelet.config.k8s.io\/v1beta1\nkind: KubeletConfiguration\ncgroupDriver: systemd<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u5341\u4e8c\u3001\u57fa\u4e8ekubeadm.yaml\u521d\u59cb\u5316k8s\u96c6\u7fa4<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 ~]# kubeadm init --config=kubeadm.yaml --ignore-preflight-errors=SystemVerification\t\t\u57fa\u4e8ekubeadm.yaml\u521d\u59cb\u5316k8s\u96c6\u7fa4<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u5341\u4e09\u3001\u628anode1\\node2\u52a0\u5165\u5230\u4e3b\u8282\u70b9\u4e2d<\/h2>\n\n\n\n<p>\u590d\u5236\u8282\u70b9\u4fe1\u606f\uff0c\u5230node1\\node2\u53bb\u7c98\u8d34\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  mkdir -p $HOME\/.kube\n  sudo cp -i \/etc\/kubernetes\/admin.conf $HOME\/.kube\/config\n  sudo chown $(id -u):$(id -g) $HOME\/.kube\/config<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>kubeadm join 192.168.7.180:6443 --token abcdef.0123456789abcdef \\\n        --discovery-token-ca-cert-hash sha256:8eb2a953ff33124bfc7c02ab882b455979ea7728a38fdbda72a13abd030835d3<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 ~]# mkdir -p $HOME\/.kube\t\u521b\u5efakube\u5bb6\u76ee\u5f55\u4e0b\u7684\u9690\u85cf\u6587\u4ef6\n&#91;root@master1 ~]# sudo cp -i \/etc\/kubernetes\/admin.conf $HOME\/.kube\/config\t\t\u5c06k8s\u7684\u7ba1\u7406\u914d\u7f6e\u6587\u4ef6\u590d\u5236\u5230\u9690\u85cf\u76ee\u5f55\u7684\u6587\u4ef6\u4e0b\n&#91;root@master1 ~]# sudo chown $(id -u):$(id -g) $HOME\/.kube\/config\t\t\u4fee\u6539\u8bbe\u7f6e\u9690\u85cf\u76ee\u5f55\u4e0b\u6587\u4ef6\u7684\u7528\u6237\u548c\u7ec4\n&#91;root@master1 ~]#<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 ~]# kubectl get nodes\nNAME      STATUS     ROLES           AGE     VERSION\nmaster1   NotReady   control-plane   2m10s   v1.30.0\n&#91;root@master1 ~]#<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@node1 ~]#kubeadm join 192.168.7.180:6443 --token abcdef.0123456789abcdef \\\n        --discovery-token-ca-cert-hash \t\tsha256:8eb2a953ff33124bfc7c02ab882b455979ea7728a38fdbda72a13abd030835d3\n\u5c06node1\u8282\u70b9\u52a0\u5165\u5230\u96c6\u7fa4\u4e2d<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@node2 ~]#kubeadm join 192.168.7.180:6443 --token abcdef.0123456789abcdef \\\n        --discovery-token-ca-cert-hash sha256:8eb2a953ff33124bfc7c02ab882b455979ea7728a38fdbda72a13abd030835d3\n\u5c06node2\u8282\u70b9\u52a0\u5165\u5230\u96c6\u7fa4\u4e2d<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u5341\u56db\u3001\u67e5\u770b\u8282\u70b9\u4fe1\u606f<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 ~]# kubectl get nodes\t\t\u67e5\u770b\u8282\u70b9\u4fe1\u606f\nNAME      STATUS     ROLES           AGE     VERSION\nmaster1   NotReady\u6ca1\u6709\u51c6\u5907 trol-plane\u63a7\u5236\u8282\u70b9 87s\u8fd0\u884c87\u79d2 v.1.30.0\u7248\u672c\nnode1     NotReady   &lt;none>          10s     v1.30.0\nnode2     NotReady   &lt;none>          5s      v1.30.0\n&#91;root@master1 ~]#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u5341\u4e94\u3001\u7ed9node1\\node2\u6253\u5de5\u4f5c\u8282\u70b9\u6807\u7b7e<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 ~]# kubectl label nodes node1 node-role.kubernetes.io\/work=work\t \u5c06node1\u8282\u70b9\u6253\u5de5\u4f5c\u8282\u70b9\u6807\u7b7e\nnode\/node1 labeled\n&#91;root@master1 ~]# kubectl label nodes node2 node-role.kubernetes.io\/work=work\t \u5c06node2\u8282\u70b9\u6253\u5de5\u4f5c\u8282\u70b9\u6807\u7b7e\nnode\/node2 labeled\n&#91;root@master1 ~]#\n&#91;root@master1 ~]#\n&#91;root@master1 ~]# kubectl get nodes\t\t\u67e5\u770b\u8282\u70b9\u4fe1\u606f\nNAME      STATUS     ROLES           AGE     VERSION\nmaster1   NotReady   control-plane   15m     v1.30.0\nnode1     NotReady   work            9m47s   v1.30.0\t    \u89d2\u8272\u662fwork\nnode2     NotReady   work            9m42s   v1.30.0 \u89d2\u8272\u662fwork,  \u4e3a\u4ec0\u4e48\u662fNotReady\uff0c\u6ca1\u6709\u5b89\u88c5\u7f51\u7edc\u63d2\u4ef6\n&#91;root@master1 ~]#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u5341\u516d\u3001\u4e09\u4e2a\u8282\u70b9\u4e0a\u4f20\u7f51\u7edc\u63d2\u4ef6\uff1a<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-148.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"691\" height=\"499\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-148.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2055\"  sizes=\"auto, (max-width: 691px) 100vw, 691px\" \/><\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-149.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"691\" height=\"500\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-149.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2056\"  sizes=\"auto, (max-width: 691px) 100vw, 691px\" \/><\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-150.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"499\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-150.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2057\"  sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u5341\u516d\u3001master1\u3001node1\u3001node2\u8282\u70b9\u5bfc\u5165calico\u7684\u7f51\u7edc\u7ec4\u4ef6<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 ~]# ls\nanaconda-ks.cfg  calico.tar.gz  calico.yaml  kubeadm.yaml\n&#91;root@master1 ~]# ctr -n k8s.io images import calico.tar.gz \u6240\u6709\u8282\u70b9\u5bfc\u5165calico\u7684\u7f51\u7edc\u7ec4\u4ef6\nunpacking docker.io\/calico\/cni:v3.26.1 (sha256:dbdd8749b4d394abf14b528fbc5a41d654953c7e4d08f1a2133e9300affe0e98)...done\nunpacking docker.io\/calico\/node:v3.26.1 (sha256:86644b66a7ba300e287656ad141e509c5ffd1a282648d80a01d29c46c6c4870c)...done\nunpacking docker.io\/calico\/kube-controllers:v3.26.1 (sha256:0157cc18893d4ebbfbb6ec451cc022bfcc832f3c872f9fcd5534bb45586ac307)...done\nunpacking docker.io\/calico\/pod2daemon-flexvol:v3.26.1 (sha256:b21921f913c9e438ab58e06f9fbc4c8ee148278fe785d2324fb0b15ff65c74d2)...done\n&#91;root@master1 ~]# ctr -n k8s.io images import calico.tar.gz\nunpacking docker.io\/calico\/cni:v3.26.1 (sha256:dbdd8749b4d394abf14b528fbc5a41d654953c7e4d08f1a2133e9300affe0e98)...done\nunpacking docker.io\/calico\/node:v3.26.1 (sha256:86644b66a7ba300e287656ad141e509c5ffd1a282648d80a01d29c46c6c4870c)...done\nunpacking docker.io\/calico\/kube-controllers:v3.26.1 (sha256:0157cc18893d4ebbfbb6ec451cc022bfcc832f3c872f9fcd5534bb45586ac307)...done\nunpacking docker.io\/calico\/pod2daemon-flexvol:v3.26.1 (sha256:b21921f913c9e438ab58e06f9fbc4c8ee148278fe785d2324fb0b15ff65c74d2)...done\n&#91;root@master1 ~]# <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@node1 ~]# ctr -n k8s.io images import calico.tar.gz\nunpacking docker.io\/calico\/cni:v3.26.1 (sha256:dbdd8749b4d394abf14b528fbc5a41d654953c7e4d08f1a2133e9300affe0e98)...done\nunpacking docker.io\/calico\/node:v3.26.1 (sha256:86644b66a7ba300e287656ad141e509c5ffd1a282648d80a01d29c46c6c4870c)...done\nunpacking docker.io\/calico\/kube-controllers:v3.26.1 (sha256:0157cc18893d4ebbfbb6ec451cc022bfcc832f3c872f9fcd5534bb45586ac307)...done\nunpacking docker.io\/calico\/pod2daemon-flexvol:v3.26.1 (sha256:b21921f913c9e438ab58e06f9fbc4c8ee148278fe785d2324fb0b15ff65c74d2)...done\n&#91;root@node1 ~]# ctr -n k8s.io images import calico.tar.gz\nunpacking docker.io\/calico\/cni:v3.26.1 (sha256:dbdd8749b4d394abf14b528fbc5a41d654953c7e4d08f1a2133e9300affe0e98)...done\nunpacking docker.io\/calico\/node:v3.26.1 (sha256:86644b66a7ba300e287656ad141e509c5ffd1a282648d80a01d29c46c6c4870c)...done\nunpacking docker.io\/calico\/kube-controllers:v3.26.1 (sha256:0157cc18893d4ebbfbb6ec451cc022bfcc832f3c872f9fcd5534bb45586ac307)...done\nunpacking docker.io\/calico\/pod2daemon-flexvol:v3.26.1 (sha256:b21921f913c9e438ab58e06f9fbc4c8ee148278fe785d2324fb0b15ff65c74d2)...done\n&#91;root@node1 ~]# <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@node2 ~]# ls\nanaconda-ks.cfg  calico.tar.gz  calico.yaml\n&#91;root@node2 ~]# ctr -n k8s.io images import calico.tar.gz\nunpacking docker.io\/calico\/cni:v3.26.1 (sha256:dbdd8749b4d394abf14b528fbc5a41d654953c7e4d08f1a2133e9300affe0e98)...done\nunpacking docker.io\/calico\/node:v3.26.1 (sha256:86644b66a7ba300e287656ad141e509c5ffd1a282648d80a01d29c46c6c4870c)...done\nunpacking docker.io\/calico\/kube-controllers:v3.26.1 (sha256:0157cc18893d4ebbfbb6ec451cc022bfcc832f3c872f9fcd5534bb45586ac307)...done\nunpacking docker.io\/calico\/pod2daemon-flexvol:v3.26.1 (sha256:b21921f913c9e438ab58e06f9fbc4c8ee148278fe785d2324fb0b15ff65c74d2)...done\n&#91;root@node2 ~]# ctr -n k8s.io images import calico.tar.gz\nunpacking docker.io\/calico\/cni:v3.26.1 (sha256:dbdd8749b4d394abf14b528fbc5a41d654953c7e4d08f1a2133e9300affe0e98)...done\nunpacking docker.io\/calico\/node:v3.26.1 (sha256:86644b66a7ba300e287656ad141e509c5ffd1a282648d80a01d29c46c6c4870c)...done\nunpacking docker.io\/calico\/kube-controllers:v3.26.1 (sha256:0157cc18893d4ebbfbb6ec451cc022bfcc832f3c872f9fcd5534bb45586ac307)...done\nunpacking docker.io\/calico\/pod2daemon-flexvol:v3.26.1 (sha256:b21921f913c9e438ab58e06f9fbc4c8ee148278fe785d2324fb0b15ff65c74d2)...done\n&#91;root@node2 ~]# <\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u5341\u4e03\u3001master1\u7f16\u8f91calico\u7684\u914d\u7f6e\u6587\u4ef6\u53ca\u5e94\u7528calico\u914d\u7f6e\u6587\u4ef6<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 ~]# vim calico.yaml \t\t\u7f16\u8f91calico\u7684\u914d\u7f6e\u6587\u4ef6\n4768               value: \"interface=ens160\"\t\u4fee\u6539\u7f51\u5361\u63a5\u53e3\u540d\u79f0\uff1aens160\n&#91;root@master1 ~]# kubectl apply -f calico.yaml  \u5e94\u7528calico\u914d\u7f6e\u6587\u4ef6\npoddisruptionbudget.policy\/calico-kube-controllers created\nserviceaccount\/calico-kube-controllers created\n&#91;root@master1 ~]# systemctl enable kubelet\t\u8bbe\u7f6ekubelet\u5f00\u673a\u542f\u52a8\t\n&#91;root@master1 ~]# systemctl start kubelet\t\t\u542f\u52a8kubelet\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u5341\u516b\u3001node1\u3001node2\u8bbe\u7f6ekubelet\u5f00\u673a\u542f\u52a8\u3001\u542f\u52a8kubelet<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@node1 ~]#  systemctl enable kubelet\t\t\u8bbe\u7f6ekubelet\u5f00\u673a\u542f\u52a8\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/kubelet.service \u2192 \/usr\/lib\/systemd\/system\/kubelet.service.\n&#91;root@node1 ~]# systemctl start kubelet\t\t\u542f\u52a8kubelet\n&#91;root@node1 ~]#<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@node2 ~]#  systemctl enable kubelet\t\t\u8bbe\u7f6ekubelet\u5f00\u673a\u542f\u52a8\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/kubelet.service \u2192 \/usr\/lib\/systemd\/system\/kubelet.service.\n&#91;root@node2 ~]# systemctl start kubelet\t\t\u542f\u52a8kubelet\n&#91;root@node2 ~]#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u5341\u4e5d\u3001master1\u67e5\u770b\u8282\u70b9<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 ~]# kubectl get nodes\t\t\u67e5\u770b\u8282\u70b9\nNAME      STATUS   ROLES           AGE   VERSION\nmaster1   Ready    control-plane   20h   v1.30.0\nnode1     Ready    work            20h   v1.30.0\nnode2     Ready    work            20h   v1.30.0\n&#91;root@master1 ~]#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u5341\u3001node1\u3001node2\u5bfc\u5165k8s.io\u7684\u955c\u50cf<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@node1 ~]# ls\nanaconda-ks.cfg  busybox-1-28.tar.gz  calico.tar.gz  calico.yaml\n&#91;root@node1 ~]# ctr -n k8s.io images import busybox-1-28.tar.gz  \u5bfc\u5165k8s.io\u7684\u955c\u50cf\uff0c\u4e3b\u8981\u4e3a\u4e86\u6d4b\u8bd5\u7528\nunpacking docker.io\/library\/busybox:1.28 (sha256:585093da3a716161ec2b2595011051a90d2f089bc2a25b4a34a18e2cf542527c)...done\n&#91;root@node1 ~]#<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@node2 ~]# ls\nanaconda-ks.cfg  busybox-1-28.tar.gz  calico.tar.gz  calico.yaml\n&#91;root@node2 ~]# ctr -n k8s.io images import busybox-1-28.tar.gz  \u5bfc\u5165k8s.io\u7684\u955c\u50cf\uff0c\u4e3b\u8981\u4e3a\u4e86\u6d4b\u8bd5\u7528\nunpacking docker.io\/library\/busybox:1.28 (sha256:585093da3a716161ec2b2595011051a90d2f089bc2a25b4a34a18e2cf542527c)...done\n&#91;root@node2 ~]#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u5341\u4e00\u3001k8s\u8fd0\u884cbusybox\u955c\u50cf\uff0c\u5e76\u751f\u6210busybox\u5bb9\u5668\uff0c\u5e76\u8fdb\u5165busybox\u5bb9\u5668<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 ~]# kubectl run busybox --image docker.io\/library\/busybox:1.28  --image-pull-policy=IfNotPresent --restart=Never --rm -it busybox -- sh\nk8s\u8fd0\u884cbusybox\u955c\u50cf\uff0c\u5e76\u751f\u6210busybox\u5bb9\u5668\uff0c\u5e76\u8fdb\u5165busybox\u5bb9\u5668\nIf you don't see a command prompt, try pressing enter.\n\/ #\n\/ # ping www.baidu.com  \u4fdd\u8bc1\u5bb9\u5668\u80fd\u4e0a\u7f51\nPING www.baidu.com (110.242.70.57): 56 data bytes\n64 bytes from 110.242.70.57: seq=0 ttl=127 time=42.868 ms\n64 bytes from 110.242.70.57: seq=1 ttl=127 time=39.068 ms\n64 bytes from 110.242.70.57: seq=2 ttl=127 time=43.879 ms\n^C\n--- www.baidu.com ping statistics ---\n3 packets transmitted, 3 packets received, 0% packet loss\nround-trip min\/avg\/max = 39.068\/41.938\/43.879 ms\n\/ # ping 110.242.70.57  ping\u767e\u5ea6\u7684IP\nPING 110.242.70.57 (110.242.70.57): 56 data bytes\n64 bytes from 110.242.70.57: seq=0 ttl=127 time=19.811 ms\n64 bytes from 110.242.70.57: seq=1 ttl=127 time=22.854 ms\n64 bytes from 110.242.70.57: seq=2 ttl=127 time=32.756 ms<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>--- 110.242.70.57 ping statistics ---\n7 packets transmitted, 7 packets received, 0% packet loss\nround-trip min\/avg\/max = 19.811\/31.522\/57.363 ms\n\/ # nslookup kubernetes.default.svc.cluster.local  \u89e3\u6790\u672c\u5730\u7684\u8ba1\u7b97\u673a\u57df\u540d\nServer:    10.96.0.10\nAddress 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local\n\nName:      kubernetes.default.svc.cluster.local\nAddress 1: 10.96.0.1 kubernetes.default.svc.cluster.local\n\/ # exit\npod \"busybox\" deleted\n&#91;root@master1 ~]#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u5341\u4e8c\u3001master1\u3001node1\u3001node2\u5173\u673a\u505a\u5feb\u7167, \u5feb\u7167\u540d\u79f0\uff1a\u5355\u8282\u70b9\u96c6\u7fa4\u914d\u7f6e\u5b8c\u6210<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@master1 ~]# shutdown -h now\n&#91;root@node1 ~]# shutdown -h now\n&#91;root@node2 ~]# shutdown -h now<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-151.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"245\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-151.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2058\"  sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-152.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"292\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-152.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2059\"  sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-153.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"251\" data-original=\"http:\/\/113.45.254.23\/wp-content\/uploads\/2025\/06\/image-153.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-2060\"  sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u5b9e\u9a8c\u73af\u5883\uff1a6\u53f0Rocky Linux\u865a\u62df\u673a 192.168.7.180 master1 192.168.7 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[152,2],"tags":[],"class_list":["post-2050","post","type-post","status-publish","format-standard","hentry","category-k8s","category-linux"],"_links":{"self":[{"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/posts\/2050","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/113.45.254.23\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2050"}],"version-history":[{"count":1,"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/posts\/2050\/revisions"}],"predecessor-version":[{"id":2061,"href":"http:\/\/113.45.254.23\/index.php?rest_route=\/wp\/v2\/posts\/2050\/revisions\/2061"}],"wp:attachment":[{"href":"http:\/\/113.45.254.23\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2050"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/113.45.254.23\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2050"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/113.45.254.23\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2050"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}