Why in GKE (Private Cluster) the destination only sees Pod IP instead of Node IP

282 Views Asked by At

I'm still learning GKE and I have set up a private cluster.

The problem I have is that when I send traffic outside the cluster from a Pod (usually by sending an HTTP request) to an external system, the external system only sees the IP address from the Pod, I was expecting the external system to see the node IP instead so that the IP range can be whitelisted.

I have also configured a Cloud NAT on my cluster, but I don't understand why the Pod IP is visible by the external system. Could you please provide a valid explanation of why this is happening?

1

There are 1 best solutions below

0
On

Is your cluster VPC-native? https://cloud.google.com/kubernetes-engine/docs/concepts/alias-ips

It's the only thing coming to my head right now that can explain this behaviour.