skip to Main Content

created a very simple nginx pod and run into status ImagePullBackoff

Events:
  Type     Reason     Age                   From               Message
  ----     ------     ----                  ----               -------
  Normal   Scheduled  32m                   default-scheduler  Successfully assigned reloader/nginx to aks-appnodepool1-22779252-vmss000000
  Warning  Failed     29m                   kubelet            Failed to pull image "nginx": rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/library/nginx:latest": failed to resolve reference "docker.io/library/nginx:latest": failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": dial tcp 52.200.78.26:443: i/o timeout
  Warning  Failed     27m                   kubelet            Failed to pull image "nginx": rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/library/nginx:latest": failed to resolve reference "docker.io/library/nginx:latest": failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": dial tcp 52.21.28.242:443: i/o timeout
  Warning  Failed     23m                   kubelet            Failed to pull image "nginx": rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/library/nginx:latest": failed to resolve reference "docker.io/library/nginx:latest": failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": dial tcp 3.223.210.206:443: i/o timeout
  Normal   Pulling    22m (x4 over 32m)     kubelet            Pulling image "nginx"
  Warning  Failed     20m (x4 over 29m)     kubelet            Error: ErrImagePull
  Warning  Failed     20m                   kubelet            Failed to pull image "nginx": rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/library/nginx:latest": failed to resolve reference "docker.io/library/nginx:latest": failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": dial tcp 3.228.155.36:443: i/o timeout
  Warning  Failed     20m (x7 over 29m)     kubelet            Error: ImagePullBackOff
  Warning  Failed     6m41s                 kubelet            Failed to pull image "nginx": rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/library/nginx:latest": failed to resolve reference "docker.io/library/nginx:latest": failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": dial tcp 52.5.157.114:443: i/o timeout
  Normal   BackOff    2m17s (x65 over 29m)  kubelet            Back-off pulling image "nginx"

Checked network status:

  • A VM in the same subnet can access "https://registry-1.docker.io/v2/library/nginx/manifests/latest" and telnet 52.5.157.114 443 successful.
  • docker pull nginx successfully on the VM in the same subnet.
  • kubectl exec into a running pod in the same cluster can wget https://registry-1.docker.io/v2/library/nginx/manifests/latest successfully.
    .
    What is the possible problem?

3

Answers


  1. Chosen as BEST ANSWER

    Turned out to be firewall dropped the package.


  2. When I wget/curl or anything you want to access

    https://registry-1.docker.io/v2/library/nginx/manifests/latest
    

    It says

    {"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"repository","Class":"","Name":"library/nginx","Action":"pull"}]}]}
    

    However this is because you need to be logged in to pull this image from this repository.

    2 solutions:

    The first is simple, in the image field just replace this url by nginx:latest and it should work

    The second: create a regcred

    Login or Signup to reply.
  3. in your pod yaml , change image : docker.io/library/nginx:latest to docker.io/nginx:latest

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search