{"id":88771,"date":"2026-08-01T18:32:53","date_gmt":"2026-08-01T10:32:53","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/88771.html"},"modified":"2026-08-01T18:32:53","modified_gmt":"2026-08-01T10:32:53","slug":"k8s%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%94%b1%e4%ba%8e%e6%9c%ba%e6%88%bf%e7%bb%b4%e6%8a%a4%ef%bc%8c%e5%85%b3%e6%9c%ba%e5%90%8e%e5%90%af%e5%8a%a8%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/88771.html","title":{"rendered":"K8s\u670d\u52a1\u5668\u7531\u4e8e\u673a\u623f\u7ef4\u62a4\uff0c\u5173\u673a\u540e\u542f\u52a8\u95ee\u9898"},"content":{"rendered":"<h2>\u4e00\u3001\u80cc\u666f<\/h2>\n<p>\u670d\u52a1\u5668\u7531\u4e8e\u5347\u7ea7\u539f\u56e0&#xff0c;\u4e34\u65f6\u65ad\u7535&#xff0c;\u65ad\u7535\u524d\u624b\u52a8\u505c\u6b62\u7a0b\u5e8f\u5e76\u624b\u52a8\u5173\u673a&#xff08;k8s\u73af\u5883\u6ca1\u6709\u7406\u4f1a&#xff09;\u3002\u6062\u590d\u4f9b\u7535\u540e&#xff0c;\u95ee\u9898\u5904\u7406.<br \/>\n\u73af\u5883: centos7 docker k8s<br \/>\n[root&#064;wdy01 ~]# kubectl get node<br \/>\nE0727 13:54:51.638488  160568 memcache.go:265] couldn\u2019t get current server API group list: Get \u201chttps:\/\/10.1.1.1:6443\/api?timeout&#061;32s\u201d: dial tcp 10.1.1.1:6443: connect: connection refused<br \/>\nE0727 13:54:51.638859  160568 memcache.go:265] couldn\u2019t get current server API group list: Get \u201chttps:\/\/10.1.1.1:6443\/api?timeout&#061;32s\u201d: dial tcp 10.1.1.1:6443: connect: connection refused<br \/>\nE0727 13:54:51.640220  160568 memcache.go:265] couldn\u2019t get current server API group list: Get \u201chttps:\/\/10.1.1.1:6443\/api?timeout&#061;32s\u201d: dial tcp 10.1.1.1:6443: connect: connection refused<br \/>\nE0727 13:54:51.641583  160568 memcache.go:265] couldn\u2019t get current server API group list: Get \u201chttps:\/\/10.1.1.1:6443\/api?timeout&#061;32s\u201d: dial tcp 10.1.1.1:6443: connect: connection refused<br \/>\nE0727 13:54:51.642889  160568 memcache.go:265] couldn\u2019t get current server API group list: Get \u201chttps:\/\/10.1.1.1:6443\/api?timeout&#061;32s\u201d: dial tcp 10.1.1.1:6443: connect: connection refused<br \/>\nThe connection to the server 10.1.1.1:6443 was refused &#8211; did you specify the right host or port?<br \/>\n[root&#064;wdy01 ~]#<\/p>\n<h2>\u4e8c\u3001\u89e3\u51b3\u8fc7\u7a0b<\/h2>\n<h3>2.1 \u5148\u68c0\u67e5\u96c6\u7fa4\u6709\u6548\u671f&#xff0c;\u53d1\u73b0\u6b63\u5e38<\/h3>\n<p><span class=\"token namespace\">[root&#064;wdy01 ~]<\/span><span class=\"token comment\"># kubeadm certs check-expiration<\/span><br \/>\n<span class=\"token namespace\">[check-expiration]<\/span> Reading configuration <span class=\"token keyword\">from<\/span> the cluster<span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><br \/>\n<span class=\"token namespace\">[check-expiration]<\/span> FYI: You can look at this config file with <span class=\"token string\">&#039;kubectl -n kube-system get cm kubeadm-config -o yaml&#039;<\/span><br \/>\n<span class=\"token namespace\">[check-expiration]<\/span> Error reading configuration <span class=\"token keyword\">from<\/span> the Cluster<span class=\"token punctuation\">.<\/span> Falling back to default configuration<\/p>\n<p>CERTIFICATE                EXPIRES                  RESIDUAL TIME   CERTIFICATE AUTHORITY   EXTERNALLY MANAGED<br \/>\nadmin<span class=\"token punctuation\">.<\/span>conf                 Jul 07<span class=\"token punctuation\">,<\/span> 2027 00:21 UTC   344d            ca                      no<br \/>\napiserver                  Jul 07<span class=\"token punctuation\">,<\/span> 2027 00:21 UTC   344d            ca                      no<br \/>\napiserver-etcd-client      Jul 07<span class=\"token punctuation\">,<\/span> 2027 00:21 UTC   344d            etcd-ca                 no<br \/>\napiserver-kubelet-client   Jul 07<span class=\"token punctuation\">,<\/span> 2027 00:21 UTC   344d            ca                      no<br \/>\ncontroller-manager<span class=\"token punctuation\">.<\/span>conf    Jul 07<span class=\"token punctuation\">,<\/span> 2027 00:21 UTC   344d            ca                      no<br \/>\netcd-healthcheck-client    Jul 07<span class=\"token punctuation\">,<\/span> 2027 00:21 UTC   344d            etcd-ca                 no<br \/>\netcd-peer                  Jul 07<span class=\"token punctuation\">,<\/span> 2027 00:21 UTC   344d            etcd-ca                 no<br \/>\netcd-server                Jul 07<span class=\"token punctuation\">,<\/span> 2027 00:21 UTC   344d            etcd-ca                 no<br \/>\nfront-proxy-client         Jul 07<span class=\"token punctuation\">,<\/span> 2027 00:21 UTC   344d            front-proxy-ca          no<br \/>\nscheduler<span class=\"token punctuation\">.<\/span>conf             Jul 07<span class=\"token punctuation\">,<\/span> 2027 00:21 UTC   344d            ca                      no      <\/p>\n<p>CERTIFICATE AUTHORITY   EXPIRES                  RESIDUAL TIME   EXTERNALLY MANAGED<br \/>\nca                      Jul 02<span class=\"token punctuation\">,<\/span> 2035 01:45 UTC   8y              no<br \/>\netcd-ca                 Jul 02<span class=\"token punctuation\">,<\/span> 2035 01:45 UTC   8y              no<br \/>\nfront-proxy-ca          Jul 02<span class=\"token punctuation\">,<\/span> 2035 01:45 UTC   8y              no      <\/p>\n<h3>2.2 \u67e5\u770bkubelet\u65e5\u5fd7<\/h3>\n<p>Jul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 systemd<span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span>: kubelet.service holdoff <span class=\"token function\">time<\/span> over, scheduling restart.<br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 systemd<span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span>: Stopped kubelet: The Kubernetes Node Agent.<br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 systemd<span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span>: Started kubelet: The Kubernetes Node Agent.<br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 kubelet<span class=\"token punctuation\">[<\/span><span class=\"token number\">237447<\/span><span class=\"token punctuation\">]<\/span>: Flag &#8211;container-runtime-endpoint has been deprecated, This parameter should be <span class=\"token builtin class-name\">set<\/span> via the config <span class=\"token function\">file<\/span> specified by the Kubelet&#039;s <span class=\"token parameter variable\">&#8211;config<\/span> flag. See https:\/\/kubernetes.io\/docs\/tasks\/administer-cluster\/kubelet-config-file\/ <span class=\"token keyword\">for<\/span> <span class=\"token function\">more<\/span> information.<br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 kubelet<span class=\"token punctuation\">[<\/span><span class=\"token number\">237447<\/span><span class=\"token punctuation\">]<\/span>: Flag &#8211;pod-infra-container-image has been deprecated, will be removed <span class=\"token keyword\">in<\/span> a future release. Image garbage collector will get sandbox image information from CRI.<br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 kubelet<span class=\"token punctuation\">[<\/span><span class=\"token number\">237447<\/span><span class=\"token punctuation\">]<\/span>: I0727 <span class=\"token number\">14<\/span>:22:56.600080  <span class=\"token number\">237447<\/span> server.go:203<span class=\"token punctuation\">]<\/span> <span class=\"token string\">&#034;&#8211;pod-infra-container-image will not be pruned by the image garbage collector in kubelet and should also be set in the remote runtime&#034;<\/span><br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 kubelet<span class=\"token punctuation\">[<\/span><span class=\"token number\">237447<\/span><span class=\"token punctuation\">]<\/span>: I0727 <span class=\"token number\">14<\/span>:22:56.605137  <span class=\"token number\">237447<\/span> server.go:467<span class=\"token punctuation\">]<\/span> <span class=\"token string\">&#034;Kubelet version&#034;<\/span> <span class=\"token assign-left variable\">kubeletVersion<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;v1.2x.2&#034;<\/span><br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 kubelet<span class=\"token punctuation\">[<\/span><span class=\"token number\">237447<\/span><span class=\"token punctuation\">]<\/span>: I0727 <span class=\"token number\">14<\/span>:22:56.605175  <span class=\"token number\">237447<\/span> server.go:469<span class=\"token punctuation\">]<\/span> <span class=\"token string\">&#034;Golang settings&#034;<\/span> <span class=\"token assign-left variable\">GOGC<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;&#034;<\/span> <span class=\"token assign-left variable\">GOMAXPROCS<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;&#034;<\/span> <span class=\"token assign-left variable\">GOTRACEBACK<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;&#034;<\/span><br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 kubelet<span class=\"token punctuation\">[<\/span><span class=\"token number\">237447<\/span><span class=\"token punctuation\">]<\/span>: I0727 <span class=\"token number\">14<\/span>:22:56.606111  <span class=\"token number\">237447<\/span> server.go:895<span class=\"token punctuation\">]<\/span> <span class=\"token string\">&#034;Client rotation is on, will bootstrap in background&#034;<\/span><br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 kubelet<span class=\"token punctuation\">[<\/span><span class=\"token number\">237447<\/span><span class=\"token punctuation\">]<\/span>: I0727 <span class=\"token number\">14<\/span>:22:56.607831  <span class=\"token number\">237447<\/span> certificate_store.go:130<span class=\"token punctuation\">]<\/span> Loading cert\/key pair from <span class=\"token string\">&#034;\/var\/lib\/kubelet\/pki\/kubelet-client-current.pem&#034;<\/span><span class=\"token builtin class-name\">.<\/span><br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 kubelet<span class=\"token punctuation\">[<\/span><span class=\"token number\">237447<\/span><span class=\"token punctuation\">]<\/span>: I0727 <span class=\"token number\">14<\/span>:22:56.608791  <span class=\"token number\">237447<\/span> dynamic_cafile_content.go:157<span class=\"token punctuation\">]<\/span> <span class=\"token string\">&#034;Starting controller&#034;<\/span> <span class=\"token assign-left variable\">name<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;client-ca-bundle::\/etc\/kubernetes\/pki\/ca.crt&#034;<\/span><br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 kubelet<span class=\"token punctuation\">[<\/span><span class=\"token number\">237447<\/span><span class=\"token punctuation\">]<\/span>: W0727 <span class=\"token number\">14<\/span>:22:56.609247  <span class=\"token number\">237447<\/span> logging.go:59<span class=\"token punctuation\">]<\/span> <span class=\"token punctuation\">[<\/span>core<span class=\"token punctuation\">]<\/span> <span class=\"token punctuation\">[<\/span>Channel <span class=\"token comment\">#1 SubChannel #2] grpc: addrConn.createTransport failed to connect to {<\/span><br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 kubelet<span class=\"token punctuation\">[<\/span><span class=\"token number\">237447<\/span><span class=\"token punctuation\">]<\/span>: <span class=\"token string\">&#034;Addr&#034;<\/span><span class=\"token builtin class-name\">:<\/span> <span class=\"token string\">&#034;\/var\/run\/cri-dockerd.sock&#034;<\/span>,<br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 kubelet<span class=\"token punctuation\">[<\/span><span class=\"token number\">237447<\/span><span class=\"token punctuation\">]<\/span>: <span class=\"token string\">&#034;ServerName&#034;<\/span><span class=\"token builtin class-name\">:<\/span> <span class=\"token string\">&#034;\/var\/run\/cri-dockerd.sock&#034;<\/span>,<br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 kubelet<span class=\"token punctuation\">[<\/span><span class=\"token number\">237447<\/span><span class=\"token punctuation\">]<\/span>: <span class=\"token string\">&#034;Attributes&#034;<\/span><span class=\"token builtin class-name\">:<\/span> null,<br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 kubelet<span class=\"token punctuation\">[<\/span><span class=\"token number\">237447<\/span><span class=\"token punctuation\">]<\/span>: <span class=\"token string\">&#034;BalancerAttributes&#034;<\/span><span class=\"token builtin class-name\">:<\/span> null,<br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 kubelet<span class=\"token punctuation\">[<\/span><span class=\"token number\">237447<\/span><span class=\"token punctuation\">]<\/span>: <span class=\"token string\">&#034;Type&#034;<\/span><span class=\"token builtin class-name\">:<\/span> <span class=\"token number\">0<\/span>,<br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 kubelet<span class=\"token punctuation\">[<\/span><span class=\"token number\">237447<\/span><span class=\"token punctuation\">]<\/span>: <span class=\"token string\">&#034;Metadata&#034;<\/span><span class=\"token builtin class-name\">:<\/span> null<br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 kubelet<span class=\"token punctuation\">[<\/span><span class=\"token number\">237447<\/span><span class=\"token punctuation\">]<\/span>: <span class=\"token punctuation\">}<\/span>. Err: connection error: desc <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;transport: Error while dialing: dial unix \/var\/run\/cri-dockerd.sock: connect: connection refused&#034;<\/span><br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 kubelet<span class=\"token punctuation\">[<\/span><span class=\"token number\">237447<\/span><span class=\"token punctuation\">]<\/span>: E0727 <span class=\"token number\">14<\/span>:22:56.610057  <span class=\"token number\">237447<\/span> run.go:74<span class=\"token punctuation\">]<\/span> <span class=\"token string\">&#034;command failed&#034;<\/span> <span class=\"token assign-left variable\">err<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;failed to run Kubelet: validate service connection: validate CRI v1 runtime API for endpoint <span class=\"token entity\" title=\"\\\\&quot;\">\\\\&#034;<\/span>unix:\/\/\/var\/run\/cri-dockerd.sock<span class=\"token entity\" title=\"\\\\&quot;\">\\\\&#034;<\/span>: rpc error: code &#061; Unavailable desc &#061; connection error: desc &#061; <span class=\"token entity\" title=\"\\\\&quot;\">\\\\&#034;<\/span>transport: Error while dialing: dial unix \/var\/run\/cri-dockerd.sock: connect: connection refused<span class=\"token entity\" title=\"\\\\&quot;\">\\\\&#034;<\/span>&#034;<\/span><br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 systemd<span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span>: kubelet.service: main process exited, <span class=\"token assign-left variable\">code<\/span><span class=\"token operator\">&#061;<\/span>exited, <span class=\"token assign-left variable\">status<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">1<\/span>\/FAILURE<br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 systemd<span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span>: Unit kubelet.service entered failed state.<br \/>\nJul <span class=\"token number\">27<\/span> <span class=\"token number\">14<\/span>:22:56 wdy01 systemd<span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span>: kubelet.service failed.<\/p>\n<p>\u5982\u4e0a\u65e5\u5fd7&#xff1a;\u53d1\u73b0kubelet \u542f\u52a8\u5931\u8d25\u6838\u5fc3\u539f\u56e0&#xff1a;<br \/>\ndial unix \/var\/run\/cri-dockerd.sock: connect: connection refused<br \/>\ncri-dockerd \u670d\u52a1\u6ca1\u542f\u52a8 \/ \u672a\u5b89\u88c5&#xff0c;kubelet \u65e0\u6cd5\u5bf9\u63a5 Docker \u7684 CRI \u63a5\u53e3&#xff0c;\u76f4\u63a5\u5d29\u6e83\u9000\u51fa<\/p>\n<h3>2.3 \u89e3\u51b3<\/h3>\n<h4>1&#xff09;\u67e5\u770b\u670d\u52a1\u72b6\u6001<\/h4>\n<p>systemctl status cri-dockerd<\/p>\n<h4>2&#xff09;\u67e5\u770b\u5957\u63a5\u5b57\u6587\u4ef6\u662f\u5426\u5b58\u5728<\/h4>\n<p>ls -l \/var\/run\/cri-dockerd.sock<\/p>\n<h4>3&#xff09;\u53d1\u73b0\u65ad\u7535\u91cd\u542f\u540e&#xff0c;cri-dockerd\u670d\u52a1\u4e22\u5931\u4e86<\/h4>\n<p>\u6211\u4e0b\u8f7d\u8fc7  cri-dockerd-0.3.14-3.el7.x86_64.rpm&#xff0c;\u6267\u884crpm -ivh cri-dockerd-0.3.14-3.el7.x86_64.rpm\u5b89\u88c5\u3002<\/p>\n<h4>4&#xff09;\u91cd\u542f\u5e76\u786e\u8ba4<\/h4>\n<p>systemctl daemon-reload<br \/>\n<span class=\"token comment\"># \u5f00\u673a\u81ea\u542f\u5e76\u542f\u52a8<\/span><br \/>\nsystemctl <span class=\"token builtin class-name\">enable<\/span> <span class=\"token parameter variable\">&#8211;now<\/span> cri-docker<br \/>\n<span class=\"token comment\"># \u67e5\u770b\u72b6\u6001\u786e\u8ba4running<\/span><br \/>\nsystemctl status cri-docker<br \/>\n<span class=\"token comment\"># \u68c0\u67e5socket\u6587\u4ef6\u662f\u5426\u751f\u6210<\/span><br \/>\n<span class=\"token function\">ls<\/span> \/var\/run\/cri-dockerd.sock<\/p>\n<h4>5&#xff09;\u91cd\u542f\u5e76\u786e\u8ba4<\/h4>\n<p>\u4fee\u590d kubelet \u914d\u7f6e&#xff0c;\u6d88\u9664 cri-dockerd.sock \u8fde\u63a5\u62d2\u7edd\u62a5\u9519<\/p>\n<p><span class=\"token function\">vi<\/span> \/var\/lib\/kubelet\/config.yaml<\/p>\n<p>\u8ffd\u52a0\u4e00\u884c&#xff08;\u6ca1\u6709\u5c31\u52a0&#xff0c;\u6709\u5c31\u786e\u8ba4\u4e00\u81f4&#xff09;&#xff1a;<\/p>\n<p>containerRuntimeEndpoint: unix:\/\/\/var\/run\/cri-dockerd.sock<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260801103252-6a6dcb5427fd4.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h4>6) \u91cd\u542fkubelet<\/h4>\n<li>\u91cd\u542fkubelet<\/li>\n<p>systemctl daemon-reload<br \/>\nsystemctl restart kubelet<br \/>\n<span class=\"token comment\"># \u5b9e\u65f6\u89c2\u5bdf\u65e5\u5fd7<\/span><br \/>\njournalctl <span class=\"token parameter variable\">-u<\/span> kubelet <span class=\"token parameter variable\">-f<\/span><\/p>\n<li>\u5982\u6709\u5fc5\u8981&#xff0c;\u91cd\u542fkube-apiserver\u3001kube-controller-manage\u3001kube-scheduler<\/li>\n<p><span class=\"token comment\"># \u5982\u679c\u662fdocker\u4f5c\u4e3a\u5bb9\u5668\u7684\u8bdd&#xff0c;\u53ef\u6267\u884c\u5982\u4e0b\u547d\u4ee4\u3002\u5176\u4f59\u5bb9\u5668\u65b9\u6cd5\u7c7b\u4f3c<\/span><br \/>\n<span class=\"token function\">docker<\/span> <span class=\"token function\">ps<\/span> <span class=\"token operator\">|<\/span><span class=\"token function\">grep<\/span> kube-apiserver<span class=\"token operator\">|<\/span><span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-v<\/span> pause<span class=\"token operator\">|<\/span><span class=\"token function\">awk<\/span> <span class=\"token string\">&#039;{print $1}&#039;<\/span><span class=\"token operator\">|<\/span><span class=\"token function\">xargs<\/span> <span class=\"token parameter variable\">-i<\/span> <span class=\"token function\">docker<\/span> restart <span class=\"token punctuation\">{<\/span><span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token function\">docker<\/span> <span class=\"token function\">ps<\/span> <span class=\"token operator\">|<\/span><span class=\"token function\">grep<\/span> kube-controller-manage<span class=\"token operator\">|<\/span><span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-v<\/span> pause<span class=\"token operator\">|<\/span><span class=\"token function\">awk<\/span> <span class=\"token string\">&#039;{print $1}&#039;<\/span><span class=\"token operator\">|<\/span><span class=\"token function\">xargs<\/span> <span class=\"token parameter variable\">-i<\/span> <span class=\"token function\">docker<\/span> restart <span class=\"token punctuation\">{<\/span><span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token function\">docker<\/span> <span class=\"token function\">ps<\/span> <span class=\"token operator\">|<\/span><span class=\"token function\">grep<\/span> kube-scheduler<span class=\"token operator\">|<\/span><span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-v<\/span> pause<span class=\"token operator\">|<\/span><span class=\"token function\">awk<\/span> <span class=\"token string\">&#039;{print $1}&#039;<\/span><span class=\"token operator\">|<\/span><span class=\"token function\">xargs<\/span> <span class=\"token parameter variable\">-i<\/span> <span class=\"token function\">docker<\/span> restart <span class=\"token punctuation\">{<\/span><span class=\"token punctuation\">}<\/span><\/p>\n<h2>\u4e09\u3001\u8865\u5145<\/h2>\n<p>\u8865\u51451&#xff1a;\u6839\u636e\u5b9e\u9645\u60c5\u51b5&#xff0c;docker\u5fc5\u987b\u4fdd\u969c\u6b63\u5e38\u3002<br \/>\nsystemctl restart docker<br \/>\nsystemctl enable docker<\/p>\n<p>\u8865\u51452&#xff1a;\u5982\u542f\u52a8\u540e\u53d1\u73b0&#xff0c;worker\u8282\u70b9\u4e5f\u6ca1\u6709\u6b63\u5e38ready&#xff0c;\u5219worker\u8282\u70b9\u4e5f\u9700\u8981\u6392\u67e5\u5e76\u5b89\u88c5cri-dockerd\u3002<\/p>\n<h2>\u56db\u3001\u7ed3\u679c<\/h2>\n<p>\u5982\u4e0b\u56fe&#xff0c;\u6267\u884ckubectl get nodes\u67e5\u770b\u96c6\u7fa4\u72b6\u6001\u5df2\u6b63\u5e38\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260801103252-6a6dcb5439325.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h2>\u4e94\u3001\u65b0\u95ee\u9898<\/h2>\n<p>\u540e\u7aef\u7a0b\u5e8f\u94fe\u63a5nacos\u62a5\u9519&#xff1a;java.net.NoRouteToHostException: No route to host (Host unreachable)<br \/>\n\u6d4b\u8bd5\u53d1\u73b0&#xff0c;\u5bbf\u4e3b\u673aworker\u662f\u53ef\u4ee5\u8fde\u901a01\u90e8\u7f72\u7684nacos\u7684\u3002\u4f46\u7a0b\u5e8fpod\u5185\u4e0d\u901a\u3002\u5173\u95ed\u9632\u706b\u5899\u4e5f\u4e0d\u884c\u3002<br \/>\n\u6700\u540e\u53d1\u73b0&#xff1a;02 \u8282\u70b9\u4e0a docker\/flannel \u6b8b\u7559 iptables nat \u89c4\u5219 \u62e6\u622a\u4e86 Pod \u8bbf\u95ee\u5bbf\u4e3b\u673a\u7f51\u6bb5\u7684\u56de\u5305&#xff0c;\u6e05\u7a7a iptables \u540e\u7acb\u523b\u6062\u590d\u8fde\u901a\u3002<br \/>\n\u6700\u540e\u662f\u572802 \u6e05\u7a7a\u6240\u6709 iptables \u89c4\u5219&#xff08;nat&#043;filter&#xff09; \u89e3\u51b3\u7684\u3002<\/p>\n<p><span class=\"token comment\"># \u6e05\u7a7a\u8fc7\u6ee4\u94fe<\/span><br \/>\niptables <span class=\"token parameter variable\">-F<\/span><br \/>\n<span class=\"token comment\"># \u6e05\u7a7anat\u8f6c\u53d1\u94fe&#xff08;\u5173\u952e&#xff09;<\/span><br \/>\niptables <span class=\"token parameter variable\">-t<\/span> nat <span class=\"token parameter variable\">-F<\/span><br \/>\n<span class=\"token comment\"># \u8bbe\u7f6e\u9ed8\u8ba4\u8f6c\u53d1\u5141\u8bb8<\/span><br \/>\niptables <span class=\"token parameter variable\">-P<\/span> FORWARD ACCEPT<\/p>\n<h2>END<\/h2>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u80cc\u666f<br \/>\n\u670d\u52a1\u5668\u7531\u4e8e\u5347\u7ea7\u539f\u56e0&#xff0c;\u4e34\u65f6\u65ad\u7535&#xff0c;\u65ad\u7535\u524d\u624b\u52a8\u505c\u6b62\u7a0b\u5e8f\u5e76\u624b\u52a8\u5173\u673a&#xff08;k8s\u73af\u5883\u6ca1\u6709\u7406\u4f1a&#xff09;\u3002\u6062\u590d\u4f9b\u7535\u540e&#xff0c;\u95ee\u9898\u5904\u7406.<br \/>\n\u73af\u5883: centos7 docker k8s<br \/>\n[rootwdy01 ~]# kubectl get node<br \/>\nE0727 13:54:51.638488  160568 memcache.go:265] couldn\u2019t get current server API group list: G<\/p>\n","protected":false},"author":2,"featured_media":88769,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[120,121,43],"topic":[],"class_list":["post-88771","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-kubernetes","tag-121","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>K8s\u670d\u52a1\u5668\u7531\u4e8e\u673a\u623f\u7ef4\u62a4\uff0c\u5173\u673a\u540e\u542f\u52a8\u95ee\u9898 - \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\/88771.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"K8s\u670d\u52a1\u5668\u7531\u4e8e\u673a\u623f\u7ef4\u62a4\uff0c\u5173\u673a\u540e\u542f\u52a8\u95ee\u9898 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4e00\u3001\u80cc\u666f \u670d\u52a1\u5668\u7531\u4e8e\u5347\u7ea7\u539f\u56e0&#xff0c;\u4e34\u65f6\u65ad\u7535&#xff0c;\u65ad\u7535\u524d\u624b\u52a8\u505c\u6b62\u7a0b\u5e8f\u5e76\u624b\u52a8\u5173\u673a&#xff08;k8s\u73af\u5883\u6ca1\u6709\u7406\u4f1a&#xff09;\u3002\u6062\u590d\u4f9b\u7535\u540e&#xff0c;\u95ee\u9898\u5904\u7406. \u73af\u5883: centos7 docker k8s [rootwdy01 ~]# kubectl get node E0727 13:54:51.638488 160568 memcache.go:265] couldn\u2019t get current server API group list: G\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/88771.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-01T10:32:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260801103252-6a6dcb5427fd4.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=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/88771.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/88771.html\",\"name\":\"K8s\u670d\u52a1\u5668\u7531\u4e8e\u673a\u623f\u7ef4\u62a4\uff0c\u5173\u673a\u540e\u542f\u52a8\u95ee\u9898 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-01T10:32:53+00:00\",\"dateModified\":\"2026-08-01T10:32:53+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/88771.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/88771.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/88771.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"K8s\u670d\u52a1\u5668\u7531\u4e8e\u673a\u623f\u7ef4\u62a4\uff0c\u5173\u673a\u540e\u542f\u52a8\u95ee\u9898\"}]},{\"@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":"K8s\u670d\u52a1\u5668\u7531\u4e8e\u673a\u623f\u7ef4\u62a4\uff0c\u5173\u673a\u540e\u542f\u52a8\u95ee\u9898 - \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\/88771.html","og_locale":"zh_CN","og_type":"article","og_title":"K8s\u670d\u52a1\u5668\u7531\u4e8e\u673a\u623f\u7ef4\u62a4\uff0c\u5173\u673a\u540e\u542f\u52a8\u95ee\u9898 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4e00\u3001\u80cc\u666f \u670d\u52a1\u5668\u7531\u4e8e\u5347\u7ea7\u539f\u56e0&#xff0c;\u4e34\u65f6\u65ad\u7535&#xff0c;\u65ad\u7535\u524d\u624b\u52a8\u505c\u6b62\u7a0b\u5e8f\u5e76\u624b\u52a8\u5173\u673a&#xff08;k8s\u73af\u5883\u6ca1\u6709\u7406\u4f1a&#xff09;\u3002\u6062\u590d\u4f9b\u7535\u540e&#xff0c;\u95ee\u9898\u5904\u7406. \u73af\u5883: centos7 docker k8s [rootwdy01 ~]# kubectl get node E0727 13:54:51.638488 160568 memcache.go:265] couldn\u2019t get current server API group list: G","og_url":"https:\/\/www.wsisp.com\/helps\/88771.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-01T10:32:53+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260801103252-6a6dcb5427fd4.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/88771.html","url":"https:\/\/www.wsisp.com\/helps\/88771.html","name":"K8s\u670d\u52a1\u5668\u7531\u4e8e\u673a\u623f\u7ef4\u62a4\uff0c\u5173\u673a\u540e\u542f\u52a8\u95ee\u9898 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-01T10:32:53+00:00","dateModified":"2026-08-01T10:32:53+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/88771.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/88771.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/88771.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"K8s\u670d\u52a1\u5668\u7531\u4e8e\u673a\u623f\u7ef4\u62a4\uff0c\u5173\u673a\u540e\u542f\u52a8\u95ee\u9898"}]},{"@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\/88771","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=88771"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/88771\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/88769"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=88771"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=88771"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=88771"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=88771"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}