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

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?



Solution 1:[1]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Arnau Senserrich