Open dwrightpulse opened 6 years ago
You can customize the DNS server when you create the container groups. A JSON example is here:
"dnsConfig": {
"nameServers": [ "1.1.1.1" ],
"searchDomains": "cluster.local svc.cluster.local",
"options": "ndots:2"
},
YAML would be similar. Hope this helps.
That's great - thanks for the info and works a treat for me...
Do you know what does the "ndots:2" does? I have tried without and with in the YAML and seemingly no difference...
2 other points you may be able to shed light on: 1) is there a way to get the containers to do dynamic DNS registration (eg against a Windows Server running DNS) 2) If 1 not possible is it possible to specify a specific IP address on the VNet for the container group to use within the YAML?
I've been doing some testing/trial deployments with Linux containers attached to a private Azure VNet.
The containers launch and run as expected with an auto assigned private IP in the subnet's range - so far so good. The VNet has custom DNS servers set (and Windows VM's attached to a different subnet in the VNet inherit these DNS servers correctly) but none of the Linux containers inherit the custom DNS servers. Looking at the /etc/resolv.conf file I can see that the containers get a DNS server address of 168.63.129.16 with a DNS search domain of.ax.internal.cloudapp.net.
How can I get the containers to inherit the DNS server settings set at the VNet? (I am creating the container groups using az container create with a .YAML file)
Thanks