Setup GCP clients to mount using Elastifile internal DNS

NFS mount using DNS name fails as GCP clients are unable to use Elastifile DNS services.

The Elastifile DNS server IP is removed from clients /etc/resolv.conf by GCP policy's.


In the client instance insert the NFS VIP into /etc/dhclient.conf


[root@instance-2]# cat /etc/dhclient.conf
# Set the dhclient retry interval to 10 seconds instead of 5 minutes.
retry 10;
interface "eth0" {
    prepend domain-name-servers 10.128.0.3;
}


Restart network service on the client


[root@instance-2]# sudo systemctl restart network


Verify Elastifile NFS VIP has been inserted above GCP defaults


[root@instance-2 ]# cat /etc/resolv.conf
# Generated by NetworkManager
search c.elastifile-sa.internal google.internal
nameserver 10.128.0.3
nameserver 169.254.169.254
nameserver 8.8.8.8


Verify client can enumerate NFS exports using DNS name.


[root@instance-2# showmount -e system-98765.google.com
Export list for system-98765.google.com:
/dc01/root *


C
Colin is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.