Google Professional Cloud Network Engineer Question 530
Single answerGoogle Cloud PlatformYour company is migrating its DNS infrastructure to Google Cloud DNS. The existing DNS setup includes a zone for example.com with multiple subdomains and corresponding records. You are tasked with creating a managed zone in Cloud DNS and importing the DNS records from the existing setup. What is the correct approach to achieve this while ensuring minimal manual configuration?
- A
Manually create the managed zone in Cloud DNS and add each DNS record manually.
- B
Use the 'gcloud dns managed-zones create' command to create the managed zone and manually import the records via the GCP Console.
- C
Export the existing DNS records into a BIND zone file format and use the 'gcloud dns record-sets import' command to import the records into the managed zone.
- D
Use a third-party tool to migrate the DNS zone and records into Cloud DNS.
Show answer and explanation
Correct answer: C
Explanation
To migrate an existing DNS zone to Cloud DNS, the best practice is to export the existing records into a supported format, such as BIND zone file format, and use the gcloud dns record-sets import command. This minimizes manual errors, ensures all records are imported correctly, and takes advantage of the automation provided by Google Cloud tools.
- A. Incorrect.
This approach would work but is highly inefficient and prone to human error, especially for zones with a large number of records.
- B. Incorrect.
While creating the managed zone via the 'gcloud dns managed-zones create' command is a valid first step, manually importing records in the GCP Console is still inefficient and not the best practice for automation.
- C. Correct.
This is the correct approach. Exporting the records into a BIND zone file and using the 'gcloud dns record-sets import' command ensures that all records are imported accurately and with minimal manual effort.
- D. Incorrect.
Using a third-party tool might work but is unnecessary as Google Cloud provides built-in tools and commands to handle this migration process efficiently.