欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

【kubernetes】解决: kubelet 创建 pod 沙盒失败:RPC 错误:代码 = 未知 desc = faile...

最编程 2024-03-16 16:54:46
...

一、问题描述

服务器重启之后,执行命令查看任意一个pod,发现了如下问题:

  Warning  FailedCreatePodSandBox  12m (x3 over 14m)      kubelet  Failed to create pod sandbox: rpc error: code = Unknown desc = failed to get sandbox image "registry.k8s.io/pause:3.6": failed to pull image "registry.k8s.io/pause:3.6": failed to pull and unpack image "registry.k8s.io/pause:3.6": failed to resolve reference "registry.k8s.io/pause:3.6": failed to do request: Head "https://us-west2-docker.pkg.dev/v2/k8s-artifacts-prod/images/pause/manifests/3.6": dial tcp 173.194.174.82:443: i/o timeout

image.png



二、解决办法如下:

  1. 修改 /etc/containerd/config.toml配置文件,执行命令如下所示:
sed -i 's/registry.k8s.io\/pause:3.6/registry.aliyuncs.com\/google_containers\/pause:3.9/g' /etc/containerd/config.toml 


image.png


  1. 重启containerd
systemctl restart containerd



3.再次查看容器运行情况可以发现,一些容器已经慢慢起来了:

image.png


image.png

image.png

image.png


4.解决完成。