Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.1.4创建Containerd的配置文件-更换国内源 #17

Open
tianh opened this issue Aug 26, 2022 · 1 comment
Open

2.1.4创建Containerd的配置文件-更换国内源 #17

tianh opened this issue Aug 26, 2022 · 1 comment

Comments

@tianh
Copy link

tianh commented Aug 26, 2022

参考链接: https://blog.51cto.com/lajifeiwomoshu/5428345

摘录:
以下所有操作都是containerd 1.6.x版本做的操作。

1、指定配置文件目录

[plugins."io.containerd.grpc.v1.cri".registry]
      config_path = "/etc/containerd/certs.d/"

2、根据镜像仓库创建文件

cd /etc/containerd/certs.d/

3、配置加速

mkdir -p /etc/containerd/certs.d/docker.io
cat >/etc/containerd/certs.d/docker.io/hosts.toml <<EOF
server = "https://docker.io"
[host."https://g0v522ip.mirror.aliyuncs.com"]
  capabilities = ["pull","resolve"]
[host."https://docker.mirrors.ustc.edu.cn"]
  capabilities = ["pull","resolve"]
[host."https://registry-1.docker.io"]
  capabilities = ["pull","resolve","push"]
EOF

注意的是:

  • 如果hosts.toml文件中的capabilities中不加resolve的话,无法加速镜像
  • 要配保底的加速站点,否则可能会导致下载失败

©著作权归作者所有:来自51CTO博客作者lajifeiwomoshu的原创作品,请联系作者获取转载授权,否则将追究法律责任
containerd的那些事
https://blog.51cto.com/lajifeiwomoshu/5428345

@kmswilliam
Copy link

大哥我想问一下, 你照着这个教程安装能成功吗, 哪些流程中除了 K8S 命令相关的我没看明白别的都懂, 为啥到装 node 节点里面的 kubelet 哪里执行 kubectl get nodes 就会报 No resources found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants