Reputation: 30113
I am running GKE
cluster with single node. I have set up ingress for managing & forwarding rules inside Kubernetes
cluster.
however by default pod use instance (Node) IP
for external connection. I have not set up NAT gateway
here. I have shared node external IP with the third party but changed IP from ephemeral to static to keep it.
What is the best way possible now to manage a single IP for egress
even if we do auto-scaling from single node to multi-node but egress IP will be the same.
Upvotes: 1
Views: 5982
Reputation: 30113
Since all of my instance in public subnet managed GKE NAT gateway will not work.i have used this for my public GKE cluster.
Upvotes: 1
Reputation: 4899
The default behaviour for GKE when pods send traffic outside of the cluster, SNAT occurs and the node IP is used to replace the pod IP. The destination will only see the node IP. If you have more than 1 node, you will end up with more than 1 source IP.
Your best option to ensure you have a single IP for egress traffic is to use Cloud NAT with GKE
Upvotes: 4