-
Notifications
You must be signed in to change notification settings - Fork 175
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
[FR] DDNS update on container network #8397
Comments
I did the investigation for dynamic DNS. Looks like the work flow is the DHCP client needs to set the hostname into DHCP option 12, and DHCP server configure the domain name and send the update to DNS server. https://docs.infoblox.com/display/N83EA2/Understanding+DDNS+Updates+from+DHCP We use the code below to send dhcp request, so we should update the code below to set hostname, I checked the dependency code, it supports option 12. https://github.com/vmware/vic/blob/master/lib/dhcp/packet.go#L27 |
We have been doing this for long time.
With the above you can provide individual name space to each VIC project that could be dynamically updated. Please keep the zone TTL to low, else the dns propagation in your environment could take long time if you are using a different DNS server to query the updates. Hope this helps! |
@malikkal thanks for the sharing. And please share your script if you are convenient. |
Here you go. Please note the TTL below.
|
Sample lines from a typical entrypoint script. Hope this helps!
|
@malikkal thanks for the information! Would you like adding dynamic dns update automatically in VIC 1.5? |
Hi, Did this make into 1.5 release? Also, hostname is set by default inside the container. If no name is specified, the container id is used as the hostname. Would this hostname be used in DDNS update? #8442 implies that user has to manually set the hostname, is my understanding correct? @renmaosheng @yuyangbj |
This code is not merged into 1.5 release. For the code change, if you specified the hostname, it will be updated to DNS server. For the case using container id as hostname, we do not send the information to DNS server. |
Adding option 12 into DHCP discover packet with hostname value. |
Summary
The ability to expose hostname of containers on the container Network using Dynamic DNS updates. With this feature, customers can access their containers using hostnames.
User statement(s)
Enable DDNS updates in the DHCP server which is serving IPs for container network in VIC. Once, a container comes up on the container network, you should see the IP and hostname of the container in the DNS server.
Details
Let me know if the provided information is not enough.
See also
The text was updated successfully, but these errors were encountered: