Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicit documentation for configuring custom DNS servers in ACI. #61488

Closed
rakesh08 opened this issue Aug 25, 2020 · 6 comments
Closed

Explicit documentation for configuring custom DNS servers in ACI. #61488

rakesh08 opened this issue Aug 25, 2020 · 6 comments

Comments

@rakesh08
Copy link

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:

  • name: nginx01
    properties:
    image: nginx
    resources:
    requests:
    cpu: 1
    memoryInGb: 1.5
    ports:
    • port: 80
      dnsConfig:
      nameServers:
    • 8.8.8.8
      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.

@VikasPullagura-MSFT
Copy link
Contributor

@rakesh08
Thanks for the feedback! I have assigned the issue to content author to check and update the document as appropriate.

@VikasPullagura-MSFT
Copy link
Contributor

@dlepow
Can you please check and add your comments on this doc update request as applicable.

@dlepow
Copy link
Contributor

dlepow commented Sep 8, 2020

Reassigning doc ownership
#reassign: @macolso

@PRMerger17 PRMerger17 assigned macolso and unassigned dlepow Sep 8, 2020
@macolso
Copy link
Contributor

macolso commented Jan 8, 2021

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
Copy link
Contributor

@rakesh08 You can add the feature request here.

@Pete-rePete
Copy link

Pete-rePete commented Nov 26, 2021

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants