k3s设置containerd镜像加速

centuryw1年前 (2022-08-13)k8s1900

k3s设置containerd镜像加速

拷贝配置文件

cp /var/lib/rancher/k3s/agent/etc/containerd/config.toml /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl

打开拷贝的配置文件

vim /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl

将下面的内容添加到配置文件

[plugins.cri.registry.mirrors]
  [plugins.cri.registry.mirrors."docker.io"]
    endpoint = ["https://w8hd5qaa.mirror.aliyuncs.com"]

重启k3s

systemctl restart k3s

查看是否生效(如果显示了镜像加速地址则代表生效)

crictl info|grep  -A 5 registry


    相关文章

    k3s+kubesphere

    k3s安装文档文档地址:https://www.rancher.cn/k3s/kubesphere安装文档文档地址: https://kubesphere.com.cn/docs/v3.3/...

    k8s常见问题总结

    使用cert-manager签发证书文档地址:手把手教你使用 cert-manager 签发免费证书helm命令安装与使用文档地址:k3s 集群使用helm...

    评论列表

    一零八八
    一零八八 IP:山东省
    7个月前 (03-14)

    重启k3s改的配置又变回去了

    一零八八
    一零八八 IP:山东省
    7个月前 (03-14)

    Job for k3s.service failed because the control process exited with error code.
    See "systemctl status k3s.service" and "journalctl -xe" for details.加上就启动失败。。。

    发表评论

    访客

    看不清,换一张

    ◎欢迎参与讨论,请在这里发表您的看法和观点。