title: Is it possible to use Cloud NAT with public GKE Cluster?
body: <p>I have one public GKE cluster with 2 nodes and with that, 2 public external IPs. I want only one egress IP.</p>
  
  <p>I want to use Cloud NAT for that. It seems it is possible. </p>
  
  <blockquote>
    <p>An alias IP range assigned to the VM's network interface: Even if the
    network interface has an external IP address assigned to it, you can
    configure a Cloud NAT gateway to provide NAT for packets whose sources
    come from an alias IP range of the interface. An external IP address
    on an interface never performs one-to-one NAT for alias IP addresses.</p>
  </blockquote>
  
  <p>I created a Cloud NAT but it is not working. I use the following commands to get the IP and it always returns one of the IPs of the nodes.</p>
  
  <pre><code>kubectl run -i --tty get-ip-address --image=dwdraju/alpine-curl-jq --restart=Never
  </code></pre>
  
  <p>and </p>
  
  <pre><code>curl checkip.amazonaws.com
  </code></pre>
  
  <p>My cluster has VPC native enabled.</p>
  
  <p><a href="https://i.stack.imgur.com/TRVpq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TRVpq.png" alt="enter image description here"></a></p>