没有这样的主机:Kubernetes / Docker无法从私有k8注册表中提取

时间:2019-12-30 22:18:30

标签: docker kubernetes alpine

我在默认名称空间的k8中有一个私有docker注册中心,在https://docker-registry.default:5000处有tls。通过将本地端口转发到该端口(在端口5000)并将docker-registry.default添加到我的/etc/hosts文件中,我已经能够将图像拉入并推入其中。

但是,我正在使用无服务器框架(Nuclio),该框架为我管理部署。尽管它是由Nuclio管理的,但我怀疑,它在kubernetes方面还是失败了。这是我的错误。

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 Admin窗格(不是上面失败的窗格)后,我可以使用https://docker-registry.default:5000连接到wget。如果有帮助,Nuclio Admin容器是Alpine Linux。

0 个答案:

没有答案