0

We're hoping to use a google project to share docker images containing microservices across projects.

I was thinking I could do it using the kubernetes run command and pull an image from a project other than the current one:

kubectl run  gdrive-service --image=us.gcr.io/foo/gdrive-service 

My user credentials have access to both projects. However, it seems like the run command can only pull mages from the current project.

Is there an approach for doing this? It seems like an obvious use case.

Robert Bailey
  • 17,866
  • 3
  • 50
  • 58
Robert Moskal
  • 21,737
  • 8
  • 62
  • 86

2 Answers2

2

There are a few options here.

  1. Use _json_key auth described here with Kubernetes pull secrets.

  2. This describes how to add robots across projects as well, still without needing pull secrets.

Community
  • 1
  • 1
mattmoor
  • 1,677
  • 14
  • 9
1

In my answer here I describe a way to do this by granting the GKE service account user Storage Object Viewer permission under the project that contains the registry.

AllSySt3msG0
  • 133
  • 1
  • 7