当前位置:   article > 正文

Kubeadm v1.28 国内 kubeadm init 失败的问题_kubeadm init失败

kubeadm init失败

问题

部署kubeadm 1.28版本时,遇到以下问题,处理containerd,换源等方法都不行,最后发现是containerd配置文件中的源有问题。参考registry.k8s.io/pause:3.6 does not use the address specified by --image-repository when executing kubeadm init #2851

[kubelet-check] Initial timeout of 40s passed.

[remote_runtime.go:176] "RunPodSandbox from runtime service failed" err="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://registry.k8s.io/v2/pause/manifests/3.6\": net/http: TLS handshake timeout"

解决方法

也遇到了和你类似的问题,我的解决方案如下:

  1. mkdir /etc/containerd
  2. containerd config default > /etc/containerd/config.toml

接着编辑/etc/containerd/config.toml文件,把[plugins."io.containerd.grpc.v1.cri"]块下的sandbox_image值改为国内镜像即可,如下方代码所示(pause版本因人而异):

sandbox_image = "registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.6"

接着重启服务,重新init即可:

systemctl restart containerd.service
本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号