Google Professional Cloud Network Engineer Question 566
Select 3Google Cloud PlatformYou are configuring Cloud DNS for a GKE cluster that uses the external-DNS operator to manage DNS records dynamically. The cluster is hosting an application that requires DNS records to be created in a custom DNS zone. What steps must you take to ensure that the external-DNS operator can create DNS records in the custom DNS zone?
- A
Grant the GKE cluster's service account the 'roles/dns.admin' IAM role.
- B
Create a custom DNS zone in Cloud DNS and configure external-DNS with the zone name.
- C
Enable the Cloud DNS API in the Google Cloud project hosting the GKE cluster.
- D
Update the GKE cluster's node pool to use nodes with public IP addresses for DNS resolution.
- E
Configure external-DNS with the credentials of a service account that has permissions for the custom DNS zone.
Show answer and explanation
Correct answers: B, C, E
Explanation
To configure Cloud DNS and the external-DNS operator for GKE, you need to ensure that external-DNS is aware of the custom DNS zone, has API access to Cloud DNS, and can authenticate using a service account with the appropriate permissions. These steps ensure external-DNS can dynamically create and manage DNS records within the custom DNS zone while adhering to security best practices.
- A. Incorrect.
Incorrect. Granting the GKE cluster's service account the 'roles/dns.admin' IAM role provides too broad a level of access. It is better to follow the principle of least privilege and grant specific permissions to a dedicated service account.
- B. Correct.
Correct. You need to create a custom DNS zone in Cloud DNS and configure external-DNS with the zone name so it knows where to create and manage records.
- C. Correct.
Correct. The Cloud DNS API must be enabled in the Google Cloud project for any DNS operations to be performed.
- D. Incorrect.
Incorrect. Updating the node pool to use public IP addresses is unrelated to the functionality of external-DNS. DNS resolution works without requiring public IPs on the nodes.
- E. Correct.
Correct. External-DNS requires a service account with appropriate permissions to manage DNS records in the custom zone. You must configure external-DNS with the credentials for this service account.