1 Star 0 Fork 0

devops-ws / containerd-guide

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

containerd-guide

安装

hd i containerd
hd i containernetworking/plugins

配置文件/etc/containerd/config.tom

启动

containerd

拉取镜像

crictl pull alpine 

设置镜像

下面的配置文件将多个 Registry 映射到了本地部署的 Harbor 上:

  • docker.io -> harbor/cache
  • quay.io -> habor/quay.io
  • ghcr.io -> harbor/ghcr.io
# vim /etc/containerd/config.toml
version = 2

[plugins."io.containerd.grpc.v1.cri".registry]
  [plugins."io.containerd.grpc.v1.cri".registry.mirrors]
    [plugins."io.containerd.grpc.v1.cri".registry.mirrors."10.121.218.184:30002"]
      endpoint = ["http://10.121.218.184:30002"]
    [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
      endpoint = ["http://10.121.218.184:30002/v2/cache", "https://qtzsrp4m.mirror.aliyuncs.com/v2"]
    [plugins."io.containerd.grpc.v1.cri".registry.mirrors."quay.io"]
      endpoint = ["http://10.121.218.184:30002/v2/quay.io"]
    [plugins."io.containerd.grpc.v1.cri".registry.mirrors."ghcr.io"]
      endpoint = ["http://10.121.218.184:30002/v2/ghcr.io"]
    [plugins."io.containerd.grpc.v1.cri".registry.mirrors."k8s.gcr.io"]
      endpoint = ["https://registry.k8s.io/v2"]

[plugins."io.containerd.grpc.v1.cri".registry.configs."10.121.218.184:30002".tls]
  insecure_skip_verify = true

[plugins."io.containerd.grpc.v1.cri".registry.configs]
  [plugins."io.containerd.grpc.v1.cri".registry.configs."10.121.218.184:30002".auth]
    username = "robot_readonly"
    password = 'npcCnfZicoeZTupZnX39ew9cfIvldyZV'

镜像推送

ctr image pull registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:v1.8.0 --all-platforms
ctr image tag registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:v1.8.0 10.121.218.184:30002/registry.k8s.io/coredns:v1.8.0
ctr image push 10.121.218.184:30002/registry.k8s.io/coredns:v1.8.0 --plain-http --user user:pass

Troubleshotting

cat <<EOF >/etc/crictl.yaml
runtime-endpoint: unix:///run/containerd/containerd.sock
image-endpoint: unix:///run/containerd/containerd.sock
timeout: 2
debug: true
pull-image-on-create: false
EOF

树莓派

hd install runc --arch armhf
hd i containernetworking/plugins
hd i k9s

空文件

简介

https://github.com/devops-ws/containerd-guide/ 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/devops-workspace/containerd-guide.git
git@gitee.com:devops-workspace/containerd-guide.git
devops-workspace
containerd-guide
containerd-guide
master

搜索帮助