k8s拉取tis:4.0.1镜像失败
k8s部署tis-4.0.1时,出现镜像拉取报错,将配置中版本修改为4.0.0可正常拉取,以下时配置中拉取镜像url,和git中的tis-console配置文件一致。
volumeMounts:
- name: tis-config-volume
mountPath: /opt/app/tis-uber/web-start/conf/tis-web-config/
- name: tis-console-pvc
mountPath: "/opt/data"
image: registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1
使用 docker pull registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1 取的不?
不是,直接用kubectl apply -f ./tis-console.yaml命令执行的,docker pull可以成功。将版本换为tis-console:4.0.0也可以成功,4.0.1就不行。详细报错是这样:
Warning Failed 19m kubelet Failed to pull image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to pull and unpack image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to resolve reference "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to do request: Head "https://registry.cn-hangzhou.aliyuncs.com/v2/tis/tis-console/manifests/4.0.1": dial tcp: lookup registry.cn-hangzhou.aliyuncs.com on [::1]:53: read udp [::1]:57102->[::1]:53: read: connection refused
Warning Failed 19m kubelet Failed to pull image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to pull and unpack image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to resolve reference "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to do request: Head "https://registry.cn-hangzhou.aliyuncs.com/v2/tis/tis-console/manifests/4.0.1": dial tcp: lookup registry.cn-hangzhou.aliyuncs.com on [::1]:53: read udp [::1]:58572->[::1]:53: read: connection refused
Warning Failed 19m kubelet Failed to pull image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to pull and unpack image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to resolve reference "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to do request: Head "https://registry.cn-hangzhou.aliyuncs.com/v2/tis/tis-console/manifests/4.0.1": dial tcp: lookup registry.cn-hangzhou.aliyuncs.com on [::1]:53: read udp [::1]:39716->[::1]:53: read: connection refused
Normal Pulling 18m (x4 over 19m) kubelet Pulling image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1"
Warning Failed 18m (x4 over 19m) kubelet Error: ErrImagePull
Warning Failed 18m kubelet Failed to pull image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to pull and unpack image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to resolve reference "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to do request: Head "https://registry.cn-hangzhou.aliyuncs.com/v2/tis/tis-console/manifests/4.0.1": dial tcp: lookup registry.cn-hangzhou.aliyuncs.com on [::1]:53: read udp [::1]:33787->[::1]:53: read: connection refused
Warning Failed 18m (x6 over 19m) kubelet Error: ImagePullBackOff
Normal BackOff 4m46s (x64 over 19m) kubelet Back-off pulling image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1"
failed to pull and unpack image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to resolve reference "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to do request: Head "https://registry.cn-hangzhou.aliyuncs.com/v2/tis/tis-console/manifests/4.0.1": dial tcp: lookup registry.cn-hangzhou.aliyuncs.com on [::1]:53: read udp [::1]:57102->[::1]:53: read: connection refused Warning Failed 19m kubelet Failed to pull image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to pull and unpack image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to resolve reference "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to do request: Head "https://registry.cn-hangzhou.aliyuncs.com/v2/tis/tis-console/manifests/4.0.1": dial tcp: lookup registry.cn-hangzhou.aliyuncs.com on [::1]:53: read udp [::1]:58572->[::1]:53: read: connection refused Warning Failed 19m kubelet Failed to pull image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to pull and unpack image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to resolve reference "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to do request: Head "https://registry.cn-hangzhou.aliyuncs.com/v2/tis/tis-console/manifests/4.0.1": dial tcp: lookup registry.cn-hangzhou.aliyuncs.com on [::1]:53: read udp [::1]:39716->[::1]:53: read: connection refused Normal Pulling 18m (x4 over 19m) kubelet Pulling image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1" Warning Failed 18m (x4 over 19m) kubelet Error: ErrImagePull Warning Failed 18m kubelet Failed to pull image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to pull and unpack image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to resolve reference "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1": failed to do request: Head "https://registry.cn-hangzhou.aliyuncs.com/v2/tis/tis-console/manifests/4.0.1": dial tcp: lookup registry.cn-hangzhou.aliyuncs.com on [::1]:53: read udp [::1]:33787->[::1]:53: read: connection refused Warning Failed 18m (x6 over 19m) kubelet Error: ImagePullBackOff Normal BackOff 4m46s (x64 over 19m) kubelet Back-off pulling image "registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1"
我估计会不会是网络的问题,你可以试试如下:
- 通过
docker pull registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1,镜像拖 到本地, - 然后放到你自己的镜像仓库中,
- 再改一下tis-console.yaml 配置中的镜像路径,改成你的仓库地址,
- 最后再执行一下试试
好的,也只有先这样了,谢谢大佬
好的,也只有先这样了,谢谢大佬
你的k8s 是在什么环境中的?自建的?
好的,也只有先这样了,谢谢大佬
你的k8s 是在什么环境中的?自建的?
是的,自建的本地k8s环境