<p>I need to access a service from my cluster on GKE outside of it. This service restricts access IP allowing just one IP. So, I have to set a NAT or something like that, but I don't really sure that is the right solution to set an external gateway/NAT on my GKE cluster. Can you help me, please?</p>

<p>You can achieve this by configuring a <a href="https://cloud.google.com/solutions/connecting-securely#natgateway" rel="nofollow noreferrer">NAT Gateway</a>.</p>

<p>Here's a guide: <a href="https://github.com/johnlabarge/gke-nat-example" rel="nofollow noreferrer">https://github.com/johnlabarge/gke-nat-example</a></p>

<p>The key steps to note are that you'll need to recreate your GKE cluster to apply a network tag to the nodes, and then use that tag in your GCP Route. (You cannot just apply the route to all nodes, as it would then be applied to your NAT Gateway instance(s) as well).</p>

<p>The other point to note (perhaps obviously) is that you cannot route all traffic through the NAT Gateway, unless you route all incoming traffic through it as well. I just it just for outbound traffic to a specific set of IPs which need a stable source.</p>
