tis icon indicating copy to clipboard operation
tis copied to clipboard

k8s拉取tis:4.0.1镜像失败

Open zzxVv opened this issue 1 year ago • 6 comments

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

zzxVv avatar Oct 21 '24 06:10 zzxVv

使用 docker pull registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1 取的不?

baisui1981 avatar Oct 21 '24 06:10 baisui1981

不是,直接用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"

zzxVv avatar Oct 21 '24 07:10 zzxVv

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"

我估计会不会是网络的问题,你可以试试如下:

  1. 通过 docker pull registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.1 ,镜像拖 到本地,
  2. 然后放到你自己的镜像仓库中,
  3. 再改一下tis-console.yaml 配置中的镜像路径,改成你的仓库地址,
  4. 最后再执行一下试试

baisui1981 avatar Oct 21 '24 08:10 baisui1981

好的,也只有先这样了,谢谢大佬

zzxVv avatar Oct 21 '24 08:10 zzxVv

好的,也只有先这样了,谢谢大佬

你的k8s 是在什么环境中的?自建的?

baisui1981 avatar Oct 21 '24 08:10 baisui1981

好的,也只有先这样了,谢谢大佬

你的k8s 是在什么环境中的?自建的?

是的,自建的本地k8s环境

zzxVv avatar Oct 21 '24 08:10 zzxVv