4

In ACI we use Linux containers with virtual network support. There we have some dockerized azure function apps running that make use of Azure ServiceBus, Azure Storage Accounts, and Azure CosmosDb - which are all inside of the virtual network.

All of these services are running pretty well however when we try to access our API Management (which is also inside of the virtual network) we receive a 502 - Bad Gateway response. After connecting to the instance and adding our DNS server to the resolv.conf everything runs just fine - this leads me to the conclusion, that the DNS provided in the virtual network is not taken into respect.

Is there anything special we need to consider when using ACI with virtual networks?

1 Answer 1

2

After some investigation, we found out that the Microsoft.ContainerInstance/containerGroups ARM-template deployment has the following property: Microsoft.ContainerInstance/containerGroups/properties/dnsConfig/nameServers[]

Therein, we added our DNS server and it worked like a charm! Here's the documentation for it: https://learn.microsoft.com/en-us/azure/templates/microsoft.containerinstance/containergroups#DnsConfiguration

However, this solution is not quite clean as it requires you to double-maintain the DNS server (in the VNET settings as well as per container instance). If there's any method to get rid of this, it'll be highly appreciated.

1
  • any update on this? I too have a container that doesn't seem to take into respect DNS. A VM is not having the issue using VNet
    – Poat
    Feb 3, 2022 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.