Sandro
Sandro

Reputation: 4771

Unable to pull image from gcr.io

I've been trying to run the Hello Node tutorial for a couple of days now and I finally figured out what was preventing me from seeing the app, but I'm not sure why this is happening.

I looked at the Kubernetes events tab and kept seeing this error.

Failed to pull image "gcr.io/simpleapp-1073/hello-node": Error: image simpleapp-1073/hello-node:latest not found

simpleapp-1073 is my PROJECT_ID

When I pushed the docker image to the public docker hub and pointed my image attribute to that, everything finally started working.

Is there some trick to getting the private container registry working?

Upvotes: 11

Views: 8834

Answers (3)

Scott Jungwirth
Scott Jungwirth

Reputation: 6675

I had a similar issue where I was getting an ImagePullBackOff status on my Pod.

My fix was to re-create the kubernetes cluster and try to deploy again and everything worked.

I think something got messed up as the original-service account I used when creating the cluster got deleted and a new one was created with the same name, so perhaps there was a hidden ID attached to the old cluster still that was trying to use a service account that didn't exist anymore.

Upvotes: 0

Sandro
Sandro

Reputation: 4771

I created an entirely new project and tried the steps in the Hello Node tutorial and everything worked. The simpleapp-1073 I was trying to use before was created a long time ago, probably about a year ago. Perhaps that had some affects on this issue. I'm happy with this solution since I was just trying to get the tutorial up and running.

Upvotes: 0

rav
rav

Reputation: 3688

I had similar issue. Authentication of local docker with Google registry helped:

gcloud docker -a

and then

sudo docker pull gcr.io/simpleapp-1073/hello-node

Upvotes: 8

Related Questions