Google Professional Cloud Network Engineer Question 538
Single answerGoogle Cloud PlatformYour company is migrating its on-premises DNS infrastructure to Google Cloud DNS. As part of the migration, you need to ensure that the DNS zones and records from your existing DNS servers are imported into Cloud DNS with minimal disruption. What is the best approach to achieve this?
- A
Use the
gcloud dns managed-zones createcommand to manually create the DNS zones and then add all DNS records manually to Cloud DNS. - B
Export the zone file from the existing DNS server and import it into Cloud DNS using the
gcloud dns record-sets importcommand. - C
Configure a DNS forwarding policy to forward queries from your on-premises DNS server to Cloud DNS.
- D
Set up a Cloud DNS managed zone and use the Google Cloud Console to manually recreate the DNS records one by one.
Show answer and explanation
Correct answer: B
Explanation
The best approach to migrate DNS zones and records from an on-premises DNS server to Cloud DNS is to use the gcloud dns record-sets import command. This allows you to automate the process by exporting a zone file from your existing DNS server and importing it directly into Cloud DNS. This method reduces the risk of errors compared to manual entry and ensures the migration is completed efficiently.
- A. Incorrect.
This option is incorrect because manually creating DNS zones and records is time-consuming, error-prone, and not the most efficient approach for large-scale migrations.
- B. Correct.
This is the correct answer because exporting the zone file from the existing DNS server and importing it into Cloud DNS using the
gcloud dns record-sets importcommand is an efficient and automated way to migrate DNS records while minimizing errors and effort. - C. Incorrect.
This option is incorrect because DNS forwarding is used to forward queries to another DNS server, not for migrating zones and records.
- D. Incorrect.
This option is incorrect because manually recreating records in the Google Cloud Console is tedious, error-prone, and impractical for a large number of DNS records.