文章目录

Toggle

- 问题描述
- 解决办法

自从Docker Hub国内禁止后,导致kubesphere镜像会拉取失败,目前根据论坛解决方法可以在ClusterConfiguration CRD 中修改ks-install来解决

官方社区解答:https://ask.kubesphere.com.cn/forum/d/24242-v332-mu-qian-docker-hubwu-fa-shi-yong-jing-xiang-wu-fa-la-qu/9

问题描述


1736302850832.png

1736302588748.png

1736302884156.png

由于网络问题,导致镜像会拉取失败,直接修改ks-apiserver也会被重置为kubesphere/ks-apiserver:v3.4.1地址

kubelet  (combined from similar events): Failed to pull image "kubesphere/ks-apiserver:v3.4.1": rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/kubesphere/ks-apiserver:v3.4.1": failed to resolve reference "docker.io/kubesphere/ks-apiserver:v3.4.1": failed to do request: Head "https://registry-1.docker.io/v2/kubesphere/ks-apiserver/manifests/v3.4.1": dial tcp 45.114.11.25:443: i/o timeout
  Normal   BackOff  12s (x284635 over 48d)  kubelet  Back-off pulling image "kubesphere/ks-apiserver:v3.4.1"


1736302665032.png

解决办法


在CRD资源对象搜索ClusterConfiguration

1736302918457.png

找到ks-install,进行编辑

1736302925979.png

添加local_reistry配置

1736302973945.png

local_registry: harbor.frps.cn
#Harbor.frps.cn为私有镜像地址,也可以使用阿里云加速地址


接下来我们调整系统组件镜像地址

找到ks-apiserver

1736303030521.png

修改镜像地址

1736303042209.png

image: 'harbor.frps.cn/dockerhub/kubesphere/ks-apiserver:v3.4.1'


1736303087600.png

> 其它组件也可以按照这个方法修改,我这里使用的是Harbor,也可以使用阿里云的代理地址