cloudfoundry-incubator / kubecf

Cloud Foundry on Kubernetes
Apache License 2.0
115 stars 62 forks source link

Eirini -> Failed to pull image #1558

Open macevil opened 4 years ago

macevil commented 4 years ago

Describe the bug Eirini can't pull and deploy the created spring-music app image:

  Type     Reason     Age                   From                                                     Message
  ----     ------     ----                  ----                                                     -------
  Normal   Scheduled  <unknown>             default-scheduler                                        Successfully assigned eirini/spring-music-java-55f05329b8-0 to kw-bb79ae50-0000
  Warning  Failed     21m (x4 over 24m)     kubelet, kw-bb79ae50-0000  Failed to pull image "127.0.0.1:31666/cloudfoundry/a2793dd7-8772-4205-a2d2-03a7381fbe91:c7f7e9bb794c77de7b0486443ac39f974f1c6913": rpc error: code = Unknown desc = Error response from daemon: Get http://127.0.0.1:31666/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
  Normal   Pulling    19m (x5 over 24m)     kubelet, kw-bb79ae50-0000  Pulling image "127.0.0.1:31666/cloudfoundry/a2793dd7-8772-4205-a2d2-03a7381fbe91:c7f7e9bb794c77de7b0486443ac39f974f1c6913"
  Normal   BackOff    14m (x29 over 24m)    kubelet, kw-bb79ae50-0000  Back-off pulling image "127.0.0.1:31666/cloudfoundry/a2793dd7-8772-4205-a2d2-03a7381fbe91:c7f7e9bb794c77de7b0486443ac39f974f1c6913"
  Warning  Failed     9m30s (x49 over 24m)  kubelet, kw-bb79ae50-0000
  Error: ImagePullBackOff
  Warning  Failed     4m30s (x8 over 24m)   kubelet, kw-bb79ae50-0000  Error: ErrImagePull

To Reproduce

  1. Install latest version of kubecf (v2.6.1) with
    eirini:
    enabled: true
  2. cf push Spring Music app https://github.com/cloudfoundry-samples/spring-music

Expected behavior The app is deployed succesfully.

Environment

macevil commented 3 years ago

How can I solve this problem? Is it possible to configure an external registry?

f0rmiga commented 3 years ago

@jimmykarily Have you seen this error before?

jimmykarily commented 3 years ago

There should be a NodePort service listening on 31666 (the bits "registry") and the bits pod should be up and running. The error message indicates that connection to the bits pod is not possible. I don't think an external registry is supported. The staging components assume there is bits service (e.g. look here: https://github.com/cloudfoundry-incubator/eirini-staging/blob/master/cmd/uploader/uploader.go#L16, there is no mention of a docker registry).