Deploy container apps with same static IP for ingress and egress traffic

Klaus Helenius 0 Reputation points
2025-03-04T13:13:53.0433333+00:00

I have deployed container apps with workload profiles and NAT gateway for eggress, but there's currently separate IPs for ingress via load balancer and eggress via NAT gateway. What is the correct way to get same IP for both?

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
562 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deepanshu katara 14,490 Reputation points MVP
    2025-03-04T14:13:58.9866667+00:00

    Hello , Welcome to MS Q&A

    Azure does not support directly assigning the same public IP address to both a Load Balancer and a NAT Gateway. However, you can achieve this by Configure a single public IP address for outbound and inbound traffic to a container group using Azure firewall

    In this article, https://learn.microsoft.com/en-us/azure/container-instances/container-instances-egress-ip-address

    you use the Azure CLI to create the resources for this scenario:

    • Container groups deployed on a delegated subnet in the virtual network
    • An Azure firewall deployed in the network with a static public IP address
    • A user-defined route on the container groups' subnet
    • A NAT rule for firewall ingress and an application rule for egress

    You then validate ingress and egress from example container groups through the firewall.

    Please check thisfor more details

    If you have any further questions let me know

    Kindly accept answer if it helps

    Thanks
    Deepanshu


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.