I'm setting up an OpenShift cluster in Google Cloud and have a bunch of VM's spun up. I also have a Google Cloud DNS zone where I have registered the hostnames of the VM's I've set up. I want to be able to reference all the VM's by the hostnames I've configured in my Google Cloud DNS zone and not by the local names Google Cloud Platform gives them. How do I go about doing that please?
I've tried editing resolv.conf (they are all Centos 7 Linux VMs) but that doesn't work and I understand that gets overwritten every DHCP lease renewal anyway.
To explain in more detail, I'll use 1 VM as an example. I have a VM called 'nat-gateway'. It's 'hostname -f' is nat-gateway.c.MyProjectName.internal and I can ping it using both nat-gateway and it's fqdn nat-gateway.c.MyProjectName.internal. On my Cloud DNS zone, called cloud.abc.gcp I have created an A record for nat-gateway and I want to be able to ping it using nat-gateway.cloud.abc.gcp. So for all my VMs I want to ping them by their corresponding cloud.abc.gcp hostnames.
Your help would be very much appreciated, thank you.