containerd 加速配置
  mPcyh9OXzYGu 2023年11月02日 46 0

默认的registry-1.docker.io被限制次数,搞的好烦

k8s 1.24 之后默认是不支持docker的,用containerd做实验,拉取镜像多次失败及被限制

FATA[0011] pulling image: rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/kubesphere/pause:3.8": failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/kubesphere/pause/manifests/sha256:9001185023633d17a2f98ff69b6ff2615b8ea02a825adffa40422f51dfdcde9d: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit: Process exited with status 1

failed: [node3] [PullImages] exec failed after 3 retries: pull image failed: Failed to exec command: sudo -E /bin/bash -c "env PATH=$PATH crictl pull kubesphere/pause:3.8 --platform amd64" 

E1020 15:39:38.279989   18564 remote_image.go:238] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"docker.io/kubesphere/pause:3.8\": failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/kubesphere/pause/manifests/sha256:9001185023633d17a2f98ff69b6ff2615b8ea02a825adffa40422f51dfdcde9d: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit" image="kubesphere/pause:3.8"

containerd 加速配置_加速

用ansible-playbook写了个脚本,批量替换

cat containerd_setup.yml
---
- hosts: u7
  become: true
  tasks:
    - name: Add mirror repositories to containerd config
      lineinfile:
        path: /etc/containerd/config.toml
        regexp: '^\s*endpoint\s*=\s*\["https://registry-1.docker.io"\]'
        line: '          endpoint = ["https://dockerproxy.com", "https://docker.m.daocloud.io", "https://docker.mirrors.sjtug.sjtu.edu.cn", "https://docker.nju.edu.cn", "http://hub-mirror.c.163.com"]'
        state: present

单机的就直接修改 /etc/containerd/config.toml

          endpoint = ["https://registry-1.docker.io", "https://mirror.baidubce.com", "https://docker.mirrors.sjtug.sjtu.edu.cn", "https://docker.nju.edu.cn", "http://hub-mirror.c.163.com"]

【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论

推荐阅读
  wwLZeziuqjLR   2023年12月11日   30   0   0 Dockercentos
  MCWYWqSAMsot   2023年12月11日   31   0   0 Docker
  LE2wsiBPlOhg   2023年12月06日   31   0   0 Dockercentos
  DnoStTHsc0vp   2023年12月11日   24   0   0 Docker
  wwLZeziuqjLR   2023年12月08日   99   0   0 Dockercentosbash
  wwLZeziuqjLR   2023年12月07日   33   0   0 Dockercentos
mPcyh9OXzYGu