Professional Cloud Network Engineer
Your company runs its applications on Google Kubernetes Engine (GKE), and your team recently created a private Cloud DNS zone, corp.internal, to host records for internal services, such as a managed database at db.corp.internal. You verified that a Compute Engine VM in the same VPC as your GKE cluster can successfully resolve db.corp.internal. However, when you access a Pod inside your GKE cluster, you can resolve in-cluster services (for example, kubernetes.default.svc.cluster.local), but any attempt to resolve db.corp.internal fails.
Upon inspecting the coredns ConfigMap in the kube-system namespace, you discovered the default forward plugin has been modified to point directly to a public DNS provider’s IP address, bypassing the node’s local resolver. You need to enable Pods in the cluster to resolve records in the existing corp.internal private zone as well as other zones under .internal.
Upon inspecting the coredns ConfigMap in the kube-system namespace, you discovered the default forward plugin has been modified to point directly to a public DNS provider’s IP address, bypassing the node’s local resolver. You need to enable Pods in the cluster to resolve records in the existing corp.internal private zone as well as other zones under .internal.
- A. Modify the coredns ConfigMap in the kube-system namespace, and add corp.internal to a stubDomains entry that points to the VPC’s DNS resolver.
- B. Create a Kubernetes service and endpoint of type ExternalName for db.corp.internal.
- C. Enable Cloud DNS for GKE for the GKE cluster.
- D. Modify the coredns ConfigMap in the kube-system namespace. In the Corefile configuration, change the forward plugin to point to /etc/resolv.conf.