释放双眼,带上耳机,听听看~!
🤖 由 ChatGPT 生成的文章摘要
首先手动修改Containerd配置文件
vim /etc/containerd/config.toml
[plugins."io.containerd.grpc.v1.cri".registry.configs]
[plugins."io.containerd.grpc.v1.cri".registry.configs."harbor.frps.cn".tls] #harbor仓库地址,跳过TLS验证
insecure_skip_verify = true
[plugins."io.containerd.grpc.v1.cri".registry.configs."harbor.frps.cn".auth] #harbor密码信息
username = "admin"
password = "XXXXXX"
配置完毕后重启Containerd
systemctl restart containerd
下载镜像测试
root@k8s-01:/etc/containerd# ctr image pull --user "admin:XXXXX" harbor.frps.cn/prometheus-adapter/prometheus-adapter:v0.9.1
harbor.frps.cn/prometheus-adapter/prometheus-adapter:v0.9.1: resolved |++++++++++++++++++++++++++++++++++++++|
manifest-sha256:2e5612ba2ed7f3cc1447bb8f00f3e0a8e35eb32cc6a0fc111abb13bf4a35144e: done |++++++++++++++++++++++++++++++++++++++|
layer-sha256:3285053862120e5212aecf0c5b998b2436c68485a269742f3d0da72d17920c1e: done |++++++++++++++++++++++++++++++++++++++|
config-sha256:179df273784306e697d3862edbe1c8c13d75cea79f75e05320fad40830186f49: done |++++++++++++++++++++++++++++++++++++++|
layer-sha256:ec52731e927332d44613a9b1d70e396792d20a50bccfa06332a371e1c68d7785: done |++++++++++++++++++++++++++++++++++++++|
elapsed: 9.4 s total: 26.1 M (2.8 MiB/s)
unpacking linux/amd64 sha256:2e5612ba2ed7f3cc1447bb8f00f3e0a8e35eb32cc6a0fc111abb13bf4a35144e...
done: 1.336623761s
推送镜像测试
ctr images tag docker.io/library/nginx:latest harbor.frps.cn/library/nginx:latest
ctr image push --user "admin:NEoCN0YjdGr" --skip-verify harbor.frps.cn/library/nginx:latest