ErrImagePull: "Error: Status 403 trying to pull repository

1,239 views
Skip to first unread message

Yahav Biran

unread,
Nov 2, 2016, 1:01:39 PM11/2/16
to Kubernetes user discussion and Q&A
I am trying to create a docker image based on another exiting image taken form guestbook example. 
Dockerfile:

FROM php:5-apache


RUN apt-get update

RUN sed -i 's#ErrorLog /proc/self/fd/2#ErrorLog "|$/bin/cat 1>\&2"#' /etc/apache2/apache2.conf

RUN sed -i 's#CustomLog /proc/self/fd/1 combined#CustomLog "|/bin/cat" combined#' /etc/apache2/apache2.conf

build:

docker build .


tagged it:

docker tag 4a270979cff6 gcr.io/csye6225-143316/myapp


pushed it

gcloud docker push gcr.io/csye6225-143316/myapp


created a cluster :

gcloud container clusters create myappcluster


controller:

kubectl create -f ../myapp-controller.yaml


pods shown as:

ybiranMacBookPro:myapp ybiran$ kubectl get pods

NAME          READY     STATUS             RESTARTS   AGE

myapp-cdq53   0/1       ImagePullBackOff   0          19m

myapp-dnda3   0/1       ImagePullBackOff   0          19m

myapp-gwyyr   0/1       ImagePullBackOff   0          19m 


get pods

2m        19m       8         myapp-gwyyr   Pod       spec.containers{myapp}   Warning   Failed       {kubelet gke-myappcluster-default-pool-27a3d156-wtqg}   Failed to pull image "gcr.io/csye6225-143316/myapp:latest": Error: Status 403 trying to pull repository csye6225-143316/myapp: "Unable to access the repository: csye6225-143316/myapp; please verify that it exists and you have permission to access it."


the logs shows:

2m         19m         8         myapp-cdq53                                   Pod       spec.containers{myapp}   Normal    Pulling                   {kubelet gke-myappcluster-default-pool-27a3d156-spk8}      pulling image "gcr.io/csye6225-143316/myapp:latest"

2m         19m         8         myapp-cdq53                                   Pod       spec.containers{myapp}   Warning   Failed                    {kubelet gke-myappcluster-default-pool-27a3d156-spk8}      Failed to pull image "gcr.io/csye6225-143316/myapp:latest": Error: Status 403 trying to pull repository csye6225-143316/myapp: "Unable to access the repository: csye6225-143316/myapp; please verify that it exists and you have permission to access it."

2m         19m         8         myapp-cdq53                                   Pod                                Warning   FailedSync                {kubelet gke-myappcluster-default-pool-27a3d156-spk8}      Error syncing pod, skipping: failed to "StartContainer" for "myapp" with ErrImagePull: "Error: Status 403 trying to pull repository csye6225-143316/myapp: \"Unable to access the repository: csye6225-143316/myapp; please verify that it exists and you have permission to access it.\""



I tried to pull it manually 
and everything seems to be ok

Digest: sha256:4740d7db6bff755ac81c5d4561871717091705f8ac178fae0933d27bab410b12

Status: Image is up to date for gcr.io/csye6225-143316/myapp:latest



Is there anything else I need to do in order to allow GKE to pull the image?

Matthew Moore

unread,
Nov 2, 2016, 2:11:27 PM11/2/16
to kubernet...@googlegroups.com
Is the cluster in the same project (csye6225-143316) as the image?

--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.



--
Matthew Moore
DI/Docker (aka Convoy)
Developer Infrastructure @ Google

Yahav Biran

unread,
Nov 2, 2016, 6:04:21 PM11/2/16
to Kubernetes user discussion and Q&A
Thanks, I switched projects and all works as a magic! 
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-use...@googlegroups.com.
To post to this group, send email to kubernet...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages