I have a regional GKE cluster and want to have a NAT box in each zone and all traffic within the zone routed via the corresponding nat, to hide the IP of the worker nodes.
I have attempted to use this example as a starting point:
The config creates the nat boxes, but when I run a pod using alpine and curl ipinfo.io/ip from within the container to get the external ip as seen by the container in the cluster, it returns the ip of the host, meaning the routing to send outbound traffic from the cluster to the nat gw isn't there.
Am I missing something? Or is the example incomplete?
I have a regional GKE cluster and want to have a NAT box in each zone and all traffic within the zone routed via the corresponding nat, to hide the IP of the worker nodes.
I have attempted to use this example as a starting point:
https://github.com/GoogleCloudPlatform/terraform-google-nat-gateway/blob/master/examples/ha-nat-gateway/main.tf
The config creates the nat boxes, but when I run a pod using alpine and
curl ipinfo.io/ip
from within the container to get the external ip as seen by the container in the cluster, it returns the ip of the host, meaning the routing to send outbound traffic from the cluster to the nat gw isn't there.Am I missing something? Or is the example incomplete?