创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。如果未按模板创建问题,管理员有权关闭问题。
确保帖子格式清晰易读,用 markdown code block 语法格式化代码块。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。
操作系统信息
虚拟机,Ubuntu22.04,4C/8G
Kubernetes版本信息
v1.33.3
容器运行时
containerd 1.7.6
KubeSphere版本信息
v4.2.0。离线安装.使用kk安装。
问题是什么
执行命令
./kk init registry -i inventory_init_registry.yaml --workdir $(pwd)/prepare --set binary_dir=$(pwd)/kubekey/kubekey
报错信息
16:19:06 CST [roles/image-registry] ImageRegistry | Push images package to image registry
⠋ [harbor] failed [0s]
16:19:06 CST [Playbook default/init-registry-h92gb] finish. total: 88,success: 87,ignored: 0,failed: 1
Error: task [ImageRegistry | Push images package to image registry](default/init-registry-h92gb-rnpjc) run failed:
[harbor]: failed to push image: failed to push image "quay.io/tigera/operator:v1.34.5" to remote: Head "https://docker.ks.local/v2/tigera/operator/manifests/sha256:f954fe8d1f5d78ccf39c54c83968e9ab592a73c8040db64fe70611db0a9d1b71": dial tcp: lookup docker.ks.local on 127.0.0.53:53: server misbehaving
task [ImageRegistry | Push images package to image registry](default/init-registry-h92gb-rnpjc) run failed:
[harbor]: failed to push image: failed to push image "quay.io/tigera/operator:v1.34.5" to remote: Head "https://docker.ks.local/v2/tigera/operator/manifests/sha256:f954fe8d1f5d78ccf39c54c83968e9ab592a73c8040db64fe70611db0a9d1b71": dial tcp: lookup docker.ks.local on 127.0.0.53:53: server misbehaving
配置文件是
root@kse-deploy:/opt/offline# cat inventory_init_registry.yaml
kind: Inventory
metadata:
name: default
spec:
hosts:
harbor:
internal_ipv4: 172.16.0.26
connector:
host: 172.16.0.26
port: 22
user: root
password: Root@123
groups:
image_registry:
hosts:
- harbor
vars:
image_registry:
type: harbor
auth:
registry: docker.ks.local
username: admin
password: Harbor12345
#cert_file: <可信服务证书路径>
#key_file: <服务证书 key 路径>
localDNS:
- /etc/hosts