Situation
I Was Removing hostNetwork: true From An Internal API Service Running On GKE, Because It Capped Each Node To One Pod And Forced The Cluster To Scale Out Wider Than It Needed To. Right After The Change, Every Connection From These Pods To An On-Prem Service Started Getting Blocked By The Firewall. The Rule Clearly Allowed The Node Subnet, So I Suspected A Stale Rule, But Three Re-Checks Later The Real Problem Showed Up: The Source IP On The Wire Wasn’t The Node IP, It Was The Pod’s Own IP. I’d Always Assumed Anything Leaving A Node Gets SNAT’d To The Node IP, And That Doesn’t Hold On GKE’s VPC-Native Mode, Where The Pod IP Is A Real, Routable Secondary Range Inside The VPC And RFC1918 Traffic Isn’t SNAT’d. The Fix Was Deploying ip-masq-agent And Explicitly Excluding The On-Prem CIDR From The “Don’t SNAT” List. It Left A Bigger Question Behind: How Many Of My K8s Networking Assumptions Only Hold On One Specific Platform? I’d Hit The Pod IP Trap, But I Didn’t Know How ClusterIP And LoadBalancer IP Work On On-Prem, GCP, And AWS, So This Post Is What I Found Chasing That Down.