GKE: Does each Node have her own external public IP?

1.7k Views Asked by At

I want to pull data from a crypto exchange API. For that I would run my code in GKE. The API is limited at 20 requests per second.

But if I would run my program from different nodes in my cluster, each of these nodes would have an other ip right?

How can I achieve multiple external IP's in my GKE cluster?

1

There are 1 best solutions below

0
On BEST ANSWER

If you're using public nodes, each node will have a different public IP and can change everytime a node is recreated.

You can create the cluster using private nodes and configure Cloud NAT, so you will always know the external IPs that your GKE cluster will have (which are the ones configured in Cloud NAT).

Another idea is to deploy Istio, and configure an egressgateway attached to a concrete node. So egress traffic for the specific hostname will come from the same IP. However, this last option adds a lot of complexity to your environment.