李小纯i
2024-06-06 21:32
kubectl apply -f pod.yaml显示pod一直在ContainerCreating状态
使用ubectl describe pod web命令发现,
报错:Failed to create pod sandbox: rpc error: code = DeadlineExceeded desc = failed to get sandbox image "rancher/mirrored-pause:3.6": failed to pull image "rancher/mirrored-pause:3.6": failed to pull and unpack image "docker.io/rancher/mirrored-pause:3.6": failed to copy: httpReadSeeker: failed open: failed to do request: Get "https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/62/6270bb605e12e581514ada5fd5b3216f727db55dc87d5889c790e4c760683fee/data?verify=1717682657-ukOQTkOMLj7UsDI5IlrdHVPopHc%!D(MISSING)": dial tcp 128.242.240.59:443: i/o timeout
请问该怎么解决?
已解决,原因是因为我的阿里云服务器无法访问外网,无法拉取镜像mirrored-pause:3.6和nginx:1.19,那么可以将已经下载的docker镜像在node01节点打包成tar,然后解压。具体步骤如下:
导出镜像
docker save -o /你的路径/rancher-mirrored-pause-3.6.tar rancher/mirrored-pause:3.6
导入镜像
sudo k3s ctr images import /你的路径/rancher-mirrored-pause-3.6.tar
查看已经导入的镜像
sudo k3s ctr images list
也可以参考这位大佬的回答
在没有 docker 注册表的情况下将镜像导入 k3s |cwienczek.com
从Docker到K8S,容器技术演进之路
4317 学习 · 8 问题
相似问题