问题
安装kubesphere v3.4.1时,开启了日志功能,部署时有三个pod报错了
Failed to pull image “busybox:latest”: rpc error: code = Unknown desc = failed to pull and unpack image “docker.io/library/busybox:latest”: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/library/busybox/manifests/sha256:50aa4698fa6262977cff89181b2664b99d8a56dbca847bf62f2ef04854597cf8: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
解决办法
因为是离线环境所有访问不到这个docker.io,需要改为私有仓库地址。
使用Kubesphere或者命令进行编辑,修改 sts 使用的 busyboy 镜像为本地镜像
kubectl edit sts opensearch-cluster-data -n kubesphere-logging-system
kubectl edit sts opensearch-cluster-master -n kubesphere-logging-system
本文修改后 image 内容(自己根据实际情况修改域名前缀)
registry.opsxlab.cn/library/busybox:latest
使用 kubectl get pod -A
查看
解决private key does not match public key
使用 kubekey 推送镜像时,registry节点报private key does not match public key
,因为使用 kk init registry
初始化会拷贝/etc/ssl/registry/ssl/
的证书,需要吧 /etc/ssl/registry/ssl/ 下面的文件删除和解压的kubekey
目录一起删除。重新执行kk init registry
10月 17 21:03:12 registry registry[60057]: time="2024-10-17T21:03:12.861353798+08:00" level=warning msg="No HTTP secret provided - generated random secret. This may cause problems with uploads if multiple registries are behind a load-balanc
10月 17 21:03:12 registry registry[60057]: time="2024-10-17T21:03:12.861429813+08:00" level=info msg="redis not configured" go.version=go1.11.2 instance.id=fb59fcdc-4dc9-4311-8c7a-95a51460ce65 service=registry version=v2.7.1
10月 17 21:03:12 registry registry[60057]: time="2024-10-17T21:03:12.861483353+08:00" level=info msg="Starting upload purge in 34m0s" go.version=go1.11.2 instance.id=fb59fcdc-4dc9-4311-8c7a-95a51460ce65 service=registry version=v2.7.1
10月 17 21:03:12 registry registry[60057]: time="2024-10-17T21:03:12.871138035+08:00" level=info msg="using inmemory blob descriptor cache" go.version=go1.11.2 instance.id=fb59fcdc-4dc9-4311-8c7a-95a51460ce65 service=registry version=v2.7.1
10月 17 21:03:12 registry registry[60057]: time="2024-10-17T21:03:12.872703983+08:00" level=fatal msg="tls: private key does not match public key"