Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Reserved external IP on Batch

Hi there, 

I need to use reserved external IP on my Batch jobs, is there a way to configure my jobs to use a list of reserved IPs?

1 4 242
4 REPLIES 4

Hi @giulianocr , Batch does not support using reserved IP addresses and normally batch workload does not need that.  Could you describe your use case that requiring it?  Does the job need to serve live traffic? 

Hi @bolianyin 

my customer has lots of batch jobs to ingest data from third-party databases, which requires IP whitelisting. Currently, we are trying to migrate from AWS Batch (which can have it using some configs in the non-managed NAT Gateway).

Since the NAT Gateway is costly, I was wondering if I could pre-allocate some VMs with static IPs, so use them.

Hi @bolianyin do you have any feedback for me? Thanks

Hi @giulianocr sorry about the late response.  Thanks for providing the example use case. Although Batch API does not support reserved ip directly, you can work around the limitation by creating an instanceTemplate with your reserved IP configs and using the instance template in Batch with the allocationPolicy.instances.instanceTemplate field.  Does that work for you?