创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。如果未按模板创建问题,管理员有权关闭问题。
确保帖子格式清晰易读,用 markdown code block 语法格式化代码块。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。
操作系统信息
使用vmware在一个刀片机上分出来的服务器,3主3从 centos 7.6 配置 3C16G
Kubernetes版本信息
Client Version: version.Info{Major:“1”, Minor:“22”, GitVersion:“v1.22.1”, GitCommit:“632ed300f2c34f6d6d15ca4cef3d3c7073412212”, GitTreeState:“clean”, BuildDate:“2021-08-19T15:45:37Z”, GoVersion:“go1.16.7”, Compiler:“gc”, Platform:“linux/amd64”}
Server Version: version.Info{Major:“1”, Minor:“22”, GitVersion:“v1.22.15”, GitCommit:“1d79bc3bcccfba7466c44cc2055d6e7442e140ea”, GitTreeState:“clean”, BuildDate:“2022-09-21T12:12:26Z”, GoVersion:“go1.16.15”, Compiler:“gc”, Platform:“linux/amd64”}
容器运行时
Client: Docker Engine - Community
Version: 23.0.1
API version: 1.40 (downgraded from 1.42)
Go version: go1.19.5
Git commit: a5ee5b1
Built: Thu Feb 9 19:51:00 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 19.03.15
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 99e3ed8919
Built: Sat Jan 30 03:16:33 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.18
GitCommit: 2456e983eb9e37e47538f59ea18f2043c9a73640
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.18.0
GitCommit: fec3683
KubeSphere版本信息
3.3.2
用 kk安装的
问题是什么
配置私服镜像对应的configmap中的保密字典报错
Get "https://registry.abc.com/v2/": dial tcp: lookup registry.abc.com on 169.254.25.10:53: no such host
报错的日志:
我查看的ks-api的日志:
E0313 11:29:55.769687 1 handler.go:226] Get “https://registry.abc.com/v2/”: dial tcp: lookup registry.abc.com on 169.254.25.10:53: no such host
E0313 11:29:55.769730 1 utils.go:76] /workspace/pkg/kapis/resources/v1alpha3/handler.go:227 Get “https://registry.abc.com/v2/”: dial tcp: lookup registry.abc.com on 169.254.25.10:53: no such host
I0313 11:29:55.769807 1 apiserver.go:641] 10.233.102.18 - “POST /kapis/resources.kubesphere.io/v1alpha3/namespaces/kubesphere-system/registrysecrets/nexus/verify HTTP/1.1” 401 110 25ms
E0313 11:29:56.366635 1 handler.go:226] Get “https://registry.abc.com/v2/”: dial tcp: lookup registry.abc.com on 169.254.25.10:53: no such host
E0313 11:29:56.366671 1 utils.go:76] /workspace/pkg/kapis/resources/v1alpha3/handler.go:227 Get “https://registry.abc.com/v2/”: dial tcp: lookup registry.abc.com on 169.254.25.10:53: no such host
I0313 11:29:56.366730 1 apiserver.go:641] 10.233.77.173 - “POST /kapis/resources.kubesphere.io/v1alpha3/namespaces/kubesphere-system/registrysecrets/nexus/verify HTTP/1.1” 401 110 3ms
E0313 11:29:57.820575 1 handler.go:226] Get “https://registry.abc.com/v2/”: dial tcp: lookup registry.abc.com on 169.254.25.10:53: no such host
E0313 11:29:57.820617 1 utils.go:76] /workspace/pkg/kapis/resources/v1alpha3/handler.go:227 Get “https://registry.abc.com/v2/”: dial tcp: lookup registry.abc.com on 169.254.25.10:53: no such host
I0313 11:29:57.820675 1 apiserver.go:641] 10.233.111.14 - “POST /kapis/resources.kubesphere.io/v1alpha3/namespaces/kubesphere-system/registrysecrets/nexus/verify HTTP/1.1” 401 110 3ms
E0313 11:30:29.569864 1 handler.go:226] expected key .dockerconfigjson in data, found none
E0313 11:30:29.569897 1 utils.go:76] /workspace/pkg/kapis/resources/v1alpha3/handler.go:227 expected key .dockerconfigjson in data, found none
I0313 11:30:29.569937 1 apiserver.go:641] 10.233.102.18 - “POST /kapis/resources.kubesphere.io/v1alpha3/namespaces/kubesphere-system/registrysecrets/nexus/verify HTTP/1.1” 401 51 0ms
E0313 11:30:30.351051 1 handler.go:226] expected key .dockerconfigjson in data, found none
E0313 11:30:30.351083 1 utils.go:76] /workspace/pkg/kapis/resources/v1alpha3/handler.go:227 expected key .dockerconfigjson in data, found none
I0313 11:30:30.351116 1 apiserver.go:641] 10.233.77.173 - “POST /kapis/resources.kubesphere.io/v1alpha3/namespaces/kubesphere-system/registrysecrets/nexus/verify HTTP/1.1” 401 51 0ms
E0313 11:30:31.106275 1 handler.go:226] expected key .dockerconfigjson in data, found none
E0313 11:30:31.106304 1 utils.go:76] /workspace/pkg/kapis/resources/v1alpha3/handler.go:227 expected key .dockerconfigjson in data, found none
I0313 11:30:31.106338 1 apiserver.go:641] 10.233.111.14 - “POST /kapis/resources.kubesphere.io/v1alpha3/namespaces/kubesphere-system/registrysecrets/nexus/verify HTTP/1.1” 401 51 0ms
E0313 11:32:46.736225 1 handler.go:226] Get “https://registry.abc.com/v2/”: dial tcp: lookup registry.abc.com on 169.254.25.10:53: no such host
E0313 11:32:46.736264 1 utils.go:76] /workspace/pkg/kapis/resources/v1alpha3/handler.go:227 Get “https://registry.abc.com/v2/”: dial tcp: lookup registry.abc.com on 169.254.25.10:53: no such host
I0313 11:32:46.736337 1 apiserver.go:641] 10.233.102.18 - “POST /kapis/resources.kubesphere.io/v1alpha3/namespaces/kubesphere-system/registrysecrets/nexus/verify HTTP/1.1” 401 110 26ms
E0313 11:32:47.578706 1 handler.go:226] Get “https://registry.abc.com/v2/”: dial tcp: lookup registry.abc.com on 169.254.25.10:53: no such host
E0313 11:32:47.578725 1 utils.go:76] /workspace/pkg/kapis/resources/v1alpha3/handler.go:227 Get “https://registry.abc.com/v2/”: dial tcp: lookup registry.abc.com on 169.254.25.10:53: no such host
I0313 11:32:47.578756 1 apiserver.go:641] 10.233.77.173 - “POST /kapis/resources.kubesphere.io/v1alpha3/namespaces/kubesphere-system/registrysecrets/nexus/verify HTTP/1.1” 401 110 2ms
E0313 11:32:47.796883 1 handler.go:226] Get “https://registry.abc.com/v2/”: dial tcp: lookup registry.abc.com on 169.254.25.10:53: no such host
我做了那些操作:
我是接一个自己公司私服的nexus,参考了kubesphere 官网配置harbo https的文档
地址:KubeSphere 使用 HTTPS 协议集成 Harbor 镜像仓库指南
也参考了 论坛上:
kubesphere 3.3.1 无法添加外部自签名 harbor - KubeSphere 开发者社区
无法从私有habor镜像仓库搜索到镜像 - KubeSphere 开发者社区
这两个。
3.3.2的 nodelocaldns的配置字典已经不需要改了
只改了dns的配置字典
改完后,两个都重新部署了