k3s 设置镜像

k3s Kubernetes About 433 words

增加配置

config.toml同级目录下新增配置文件config.toml.tmpl

cd /var/lib/rancher/k3s/agent/etc/containerd

config.toml.tmpl中添加中科大镜像:

[plugins.cri.registry.mirrors]
  [plugins.cri.registry.mirrors."docker.io"]
    endpoint = ["https://docker.mirrors.ustc.edu.cn"]

重启 k3s

systemctl restart k3s

查看配置

crictl info | grep mirror

输出:

[root@localhost containerd]# crictl info | grep mirror
      "mirrors": {
            "https://docker.mirrors.ustc.edu.cn"
Views: 2,236 · Posted: 2022-03-29

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh