@jbx999 Below thread might be helpful:
Hope it helps!!!
Please “Accept as Answer” if it helped so it can help others in community looking for help on similar topics
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a Vnet with 2 virtual machines and 2 container instances.
I have 2 subnets, 10.0.0.0/24 and 10.0.1.0/24, because apparently Container Instances cannot be deployed in subnets that have other types of resources for some reason.
I have a Private DNS Zone with automatic registration, linked to this vnet and the 2 VMs can resolve each other by name. They also show up in the list of registered records, resolving to 10.0.0.4 and 10.0.0.5 respectively.
However, when I try to connect from the Container Instance to the VM, the name does not resolve. If I connect directly by IP address it works.
Furthermore the 2 container instances don't even show up in the Private DNS Zone.
Is there anything I need to do for my ACI to make use of the Private DNS Zone just like the normal VMs are doing? Why are they not resolving names through the Private DNS Zone as they should?
@jbx999 Below thread might be helpful:
Hope it helps!!!
Please “Accept as Answer” if it helped so it can help others in community looking for help on similar topics
In the end I decided to move away from Azure Container Instances. They are a half baked, buggy and unstable product, with crucial functionality missing. You can't expose an ACI that is inside a vnet publicly. Accessing resources inside the vnet by DNS doesn't work properly. Registering the container itself to the private DNS zone works erratically. Furthermore West EU zone seems to be unstable, with support unable to figure out what is going on.
Just stay away from ACI.
If I explicitly configure the Container-Instance's DNS servers .... it works. And fortunately Bicep can figure out those DNS-servers of my Virtual Network for me.
resource resourceVirtualNetwork 'Microsoft.Network/virtualNetworks@2021-02-01' existing = {
name: virtualNetwork_Name
scope: resourceGroup(virtualNetwork_ResourceGroup_Name)
}resource containerGroup 'Microsoft.ContainerInstance/containerGroups@2021-09-01' = {
name: containergroup_Name
location: location
properties: {
dnsConfig:{
nameServers: resourceVirtualNetwork.properties.dhcpOptions.dnsServers
}
containers: [
{
name: containergroup_Name
properties: {
image: image
........
.........