我在k8的默认名称空间中有一个专用的停靠器注册中心,tls在https://docker-registry.default:5000上。通过对其进行本地端口转发(在端口5000处)并将docker-registry.default添加到我的/etc/hosts文件中,我已经能够拉出并将图像推送到它。
但是,我使用的是一个无服务器框架(Nuclio),它为我管理部署。我得到的错误是:
Normal Scheduled 7m52s default-scheduler Successfully assigned nuclio/helloworld1-96876fcf9-7c87w to gke-your-first-cluster-1-pool-1-fe915942-gnkx
Normal Pulling 6m14s (x4 over 7m51s) kubelet, gke-your-first-cluster-1-pool-1-fe915942-gnkx Pulling image "docker-registry.default:5000/docker/nuclio/processor-helloworld1:latest"
Warning Failed 6m14s (x4 over 7m51s) kubelet, gke-your-first-cluster-1-pool-1-fe915942-gnkx Failed to pull image "docker-registry.default:5000/docker/nuclio/processor-helloworld1:latest": rpc error: code = Unknown desc = Error response from daemon: Get https://docker-registry.default:5000/v2/: dial tcp: lookup docker-registry.default on 169.254.169.254:53: no such host
Warning Failed 6m14s (x4 over 7m51s) kubelet, gke-your-first-cluster-1-pool-1-fe915942-gnkx Error: ErrImagePull
Normal BackOff 6m2s (x6 over 7m51s) kubelet, gke-your-first-cluster-1-pool-1-fe915942-gnkx Back-off pulling image "docker-registry.default:5000/docker/nuclio/processor-helloworld1:latest"
Warning Failed 2m38s (x21 over 7m51s) kubelet, gke-your-first-cluster-1-pool-1-fe915942-gnkx Error: ImagePullBackOff它给出了一个no such host错误。
一位Nuclio开发人员已经确认,这不是一个核心问题,因为我甚至不能从核心管理器(而不是上面失败的吊舱)到这个内部docker login完成一个docker login,尽管我可以成功地为码头中心做一个D8,从一个wget到docker-registry.default。如果有帮助的话,就是高寒Linux。
发布于 2020-09-11 13:45:19
似乎您的专用DNS配置错误。检查您的主机或确保docker-registry.default是一个有效的主机名。
您可以运行一个临时的Ubuntu来检查主机名在集群中是否正确解析。
$ kubectl run ubuntu -it --image ubuntu --rm=true -- bash
root@shell:/# apt update && DEBIAN_FRONTEND=noninteractive apt --yes install dnsutils
root@shell:/# dig docker-registry.default
docker-registry.default. IN A D0.y0u.h4ve.1P?补充建议:
https://devops.stackexchange.com/questions/10349
复制相似问题