Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use an image from container registry in different project?

I have two projects in Google Cloud. On the first project I have some images in the container registry and i'm using it in the gke.

When I trie to create a container in the second project, it gives me a error:

Error: Status 403 trying to pull repository project-1/image-x: "Access denied."

How can i use those images in the gke but in different project? I don't want to create the same images in the second project.

like image 904
lucas.coelho Avatar asked Aug 26 '15 23:08

lucas.coelho


1 Answers

In your second project (the GKE project), look at the IAM permissions and you will see a user similar to: [email protected].

Then in your first project (the container registry project), grant that user the Storage Object Viewer permission to allow GKE to pull images.

like image 126
AllSySt3msG0 Avatar answered Sep 17 '22 14:09

AllSySt3msG0