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