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;

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

Verify client can enumerate NFS exports using DNS name.

[root@instance-2# showmount -e
Export list for
/dc01/root *

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.