-1

i have a simple .NET api that calls an api of an external provider. This provider requires that i indicate from which IP i will call him to allow me. So i have two options:

  1. Deploy my api on IIS with a fixed ip
  2. Do the same from docker on Azure K8S if possible?

Is possibile from different pods "set the ip caller" ti be always the same?

Bye

1 Answer 1

0

Yes, it is possible to set the IP caller always to be the same when calling an external API from different pods in Azure K8S. There are two ways do do this:

Use an Azure Load Balancer: You can create an Azure Load Balancer and assign it a static IP address. Then, you can configure your pods to use the load balancer as the outbound IP for calling the external API. This way, the IP caller will always be the static IP of the load balancer.

Use a Kubernetes Service with a Fixed IP: Another option is to create a Kubernetes Service with a fixed IP and use it as the outbound IP for calling the external API. To do this, you can use the spec.loadBalancerIP field in the Service object to specify a fixed IP. This will allow you to set the IP caller always to be the same, regardless of which pod is calling the external API.

You will need to ensure that your pods are correctly configured to use the load balancer or fixed IP service as the outbound IP when calling the external API.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .