<p>I have a GCP project with two subnets (VPC₁ and VPC₂). In VPC₁ I have a few GCE instances and in VPC₂ I have a GKE cluster.</p>

<p>I have established VPC Network Peering between both VPCs, and POD₁'s host node can reach VM₁ and vice-versa. Now I would like to be able to reach VM₁ from within POD₁, but unfortunately I can't seem to be able to reach it.</p>

<p>Is this a matter of creating the appropriate firewall rules / routes on POD₁, perhaps using its host as router, or is there something else I need to do? How can I achieve connectivity between this pod and the GCE instance?</p>

<p><a href="https://i.stack.imgur.com/Cf63d.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Cf63d.png" alt="GCP Project"></a></p>

<p>Network routes are only effective within its VPC. Say request from pod1 reaches VM1, VPC1 do not know how to route the packet back to pod1. To solve this, just need to SNAT traffic from Pod CIDR range in VPC2 and heading to VPC1. </p>

<p>Here is a simple daemonset that can help to inject iptables rules to your GKE cluster. It SNAT traffic based on custom destinations. 
<a href="https://github.com/bowei/k8s-custom-iptables" rel="nofollow noreferrer">https://github.com/bowei/k8s-custom-iptables</a></p>

<p>Of course, the firewall rules need to be setup properly.</p>
