Firewall rules to allow GKE -> GCR traffic in separate projects
717 views
Skip to first unread message
Paco Ibañez
unread,
Dec 18, 2017, 7:05:21 PM12/18/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gce-discussion
I am running Kubernetes in GCP and I have the GKE cluster and the container registry in separate projects. For security, I would like to restrict any outgoing traffic from my GKE project at the VM level. I have added an egress firewall rule to drop any traffic going out of my VPC network. As a consequence, GKE can't pull images from the registry anymore. Is there a way to write other firewall rule to allow traffic only to GCR?
Thanks!
Karthick (Cloud Platform Support)
unread,
Dec 19, 2017, 4:19:00 PM12/19/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gce-discussion
Hello,
The IP addresses that are used by GCR are ephemeral. Can you be specific about what you mean by restricting outgoing traffic from GKE project at the VM level ? However, you can check this article for using cross project images in GKE.
Navi Aujla (Google Cloud Support)
unread,
Dec 20, 2017, 1:09:25 PM12/20/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gce-dis...@googlegroups.com
Hello Paco
You can add firewall rule to allow egress traffic for the GKE service account with appropriate permissions for the GCR, however there is no dedicated IP range for GCR which you can define in the firewall rule but can define 0.0.0.0 and mention the protocol (eg: tcp;udp).