I have a private docker registry in k8 in the default namespace with tls
at https://docker-registry.default:5000
. By doing local port forwarding to it(at port 5000) and adding docker-registry.default
to my /etc/hosts
file, I have been able to pull and push images to it.
However, I'm using a serverless framework(Nuclio) which manages the deploy for me. The error I get is:
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
It gives a no such host
error.
A Nuclio developer has confirmed that it's not a nuclio issue since I cannot even do a docker login
from the Nuclio Admin pod(not the failed pod above) to this internal docker-registry.default
though I can do a docker login
to the Docker hub and a wget
to docker-registry.default
successfully. The Nuclio Admin pod is Alpine Linux if it helps.