You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When ACI is deployed to an existing vnet and the vnet is configured with custom DNS server, ACI will not inherent the custom DNS servers. And to configure ACI with custom DNS servers, the only option i see is to deploy the ACI through yaml file and not via cli or portal. Specify the DNS sever in specification of dnsConfig like below.
Configuring ACI with custom DNS servers, can this be documented?
hi @rakesh08, this is intended behavior for ACI today. We are happy to take a feature request for this process to be automated by ACI once the container is associated with a particular subnet.
@VikasPullagura-MSFT@macolso I think the issue isn't regarding the intended behaviour, Rakesh is asking for the intended behaviour to be documented explicitly? The best we have is this which is hard to follow because there is no concrete example
Separately it could be nice to make a feature request to add DNS nameServer via Azure CLI when doing a az container create without needing the yaml, but that's not the scope of this issue
When ACI is deployed to an existing vnet and the vnet is configured with custom DNS server, ACI will not inherent the custom DNS servers. And to configure ACI with custom DNS servers, the only option i see is to deploy the ACI through yaml file and not via cli or portal. Specify the DNS sever in specification of dnsConfig like below.
Configuring ACI with custom DNS servers, can this be documented?
Reference: microsoftfeedback/aci-issues#25
Below are the inhouse steps to deploy an ACI in an existing vnet with custom DNS servers.
a. Below yaml file, to deploy an ACI with nginx image in an existing vnet using network profile and configure custom DNS servers.
~$ cat aci-deploy01.yaml
apiVersion: 2018-10-01
location: eastus
name: test-aci01
properties:
containers:
properties:
image: nginx
resources:
requests:
cpu: 1
memoryInGb: 1.5
ports:
dnsConfig:
nameServers:
searchDomains: cluster.local svc.cluster.local
options: ndots:2
osType: Linux
networkProfile:
id: /subscriptions//resourceGroups//providers/Microsoft.Network/networkProfiles/
b. Below is the command to deploy the ACI.
az container create --resource-group aci-rg01 --file aci-deploy01.yaml
c. Verify the DNS servers in above deployed nginx ACI.
az container exec --name test-aci01 --resource-group aci-rg01 --exec-command /bin/bash
0067055fbf4e4ac29171957539d2864b-13f8519aaa3d1c0b9b3af1:/# cat /etc/resolv.conf
nameserver 8.8.8.8
search cluster.local svc.cluster.local
options ndots:2
References:
https://docs.microsoft.com/en-us/azure/container-instances/container-instances-multi-container-yaml#configure-a-yaml-file
https://docs.microsoft.com/en-us/azure/container-instances/container-instances-vnet#example---yaml
https://docs.microsoft.com/en-us/azure/container-instances/container-instances-reference-yaml
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: