Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grant permissions to GKE nodes to pull images from GCR #144

Open
felipecruz91 opened this issue Nov 11, 2020 · 3 comments
Open

Grant permissions to GKE nodes to pull images from GCR #144

felipecruz91 opened this issue Nov 11, 2020 · 3 comments
Labels
enhancement New feature or request GKE good first issue Good for newcomers

Comments

@felipecruz91
Copy link

Hi,

When provisioning the GKE infrastructure, it would be great to be able to pull images from the GCR that is within the same project as the GKE cluster.

Currently, there is an error:

Failed to pull image "gcr.io/xxxx-xxx/img:tag": rpc error: code = Unknown desc = Error response from daemon: pull access denied for gcr.io/xxxx-xxx/api, repository does not exist or may require 'docker login'
@pst pst added GKE enhancement New feature or request good first issue Good for newcomers labels Nov 20, 2020
@pst
Copy link
Member

pst commented Dec 4, 2020

I thought about this. It seems the best I can do is give permission to any registry bucket in the project because there is no way of knowing the bucket name of course. So the sanest default would probably be read-only access by default. And a flag to disable the read-only access and then leave users to roll their own if they requore more advanced access control. Thoughts?

@felipecruz91
Copy link
Author

As a first approach, I see no harm grating Pull (Read Only) permissions to any registry bucket that belongs to the project: https://cloud.google.com/container-registry/docs/access-control#permissions_and_roles

Nevertheless, perhaps you may find it interesting to include the creation of an empty GCR with a predefined name as part of the deployment (this would be optional) and, if that's the case, then narrow down the Pull permissions to that specific registry bucket.

@pst
Copy link
Member

pst commented Dec 7, 2020

I think it would require a rather complex module or modules to handle this for all three providers Kubestack supports, especially given the various ways teams may choose to layout their image repositories, per team, per env, per app or combinations thereof.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request GKE good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants