Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Network Engineer practice bank has an additional 2,437 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your organization uses a hub-and-spoke VPC architecture where spoke-vpc connects to hub-vpc via VPC Network Peering. hub-vpc connects to an on-premises data center over Cloud Interconnect, with Cloud Router advertising 35.199.192.0/19 and firewalls permitting TCP/UDP port 53.
A GKE Standard cluster in spoke-vpc currently uses kube-dns. You must establish bidirectional name resolution meeting these requirements:
corp.example.com records (10.200.1.10) while preserving *.internal resolution.prod.gke.example.com.spoke-vpc.Which DNS architecture should you implement?
prod.gke.example.com) and recreate the node pools. Create a Cloud DNS forwarding zone for corp.example.com targeting 10.200.1.10 authorized for hub-vpc, attach an inbound DNS server policy to hub-vpc, create DNS peering zones between spoke-vpc (corp.example.com) and hub-vpc (prod.gke.example.com), and forward prod.gke.example.com from on-premises to the hub-vpc inbound forwarder IP.This architecture combines Cloud DNS for GKE (VPC scope) with a hub-and-spoke Cloud DNS topology using forwarding zones, an inbound DNS server policy, and bidirectional Cloud DNS peering zones. It decouples control-plane DNS resolution across VPCs from VPC Network Peering's non-transitive forwarding restrictions.
corp.example.com and *.internal:
spoke-vpc for corp.example.com (consumer: spoke-vpc, producer: hub-vpc) forwards queries according to hub-vpc's name resolution order.hub-vpc matches its authorized forwarding zone for corp.example.com and sends queries from 35.199.192.0/19 over Cloud Interconnect to 10.200.1.10.*.internal) and cluster records continue resolving normally.prod.gke.example.com (and recreating node pools) publishes all cluster Service and headless Service endpoint records into a VPC-scoped Cloud DNS private zone in spoke-vpc.prod.gke.example.com to the inbound forwarder IP allocated by hub-vpc's inbound DNS server policy.hub-vpc for prod.gke.example.com targeting spoke-vpc allows the hub-vpc inbound forwarder to resolve records in spoke-vpc's GKE-managed private zone.spoke-vpc because all hybrid DNS traffic transits hub-vpc cleanly.hub-vpc.*.internal and private zones.Unlike kube-dns (which cannot expose headless Services outside the cluster), kube-dns ConfigMaps (which are ignored by Cloud DNS VPC scope), or directly authorizing spoke-vpc on hub-vpc's forwarding zone (which fails across VPC Network Peering), this design adheres to Google Cloud's hub-and-spoke hybrid DNS reference architecture and guarantees reliable bidirectional resolution.
prod.gke.example.com) and recreate the node pools. Add corp.example.com (10.200.1.10) to stubDomains in the kube-dns ConfigMap, attach an inbound DNS server policy to hub-vpc, create a DNS peering zone from hub-vpc to spoke-vpc for prod.gke.example.com, and forward prod.gke.example.com from on-premises to the hub-vpc inbound forwarder IP.This option correctly migrates the GKE Standard cluster to Cloud DNS for GKE in VPC scope using the unique custom domain prod.gke.example.com and recreates the node pools so Pods point to the local metadata server (169.254.169.254) instead of kube-dns. It also configures the inbound path from on-premises through hub-vpc to spoke-vpc. However, it relies on stubDomains inside the kube-dns ConfigMap to handle outbound resolution for corp.example.com.
corp.example.com: When Cloud DNS for GKE is configured in VPC scope, the Cloud DNS controller completely ignores the kube-dns ConfigMap. Any stubDomains or upstreamNameservers entries added to that ConfigMap are not translated into Cloud DNS forwarding zones and have zero effect on DNS resolution.spoke-vpc for corp.example.com fall back to standard Cloud DNS public resolution and fail with NXDOMAIN, rather than forwarding to 10.200.1.10.kube-dns ConfigMap stubDomains and upstreamNameservers into Cloud DNS forwarding zones only when using cluster scope.kube-dns to Cloud DNS VPC scope requires recreating or upgrading node pools so kubelet updates Pod /etc/resolv.conf files to 169.254.169.254 (or 169.254.20.10 if NodeLocal DNSCache is enabled).Instead of modifying the kube-dns ConfigMap, outbound forwarding for corp.example.com were configured directly in Cloud DNS using a forwarding zone in hub-vpc paired with a Cloud DNS peering zone in spoke-vpc.
kube-dns on the cluster, add corp.example.com (10.200.1.10) and internal (169.254.169.254) to stubDomains in the kube-dns ConfigMap, attach an inbound DNS server policy to hub-vpc, create a DNS peering zone from hub-vpc to spoke-vpc for cluster.local, and forward prod.gke.example.com from on-premises to the hub-vpc inbound forwarder IP.This configuration keeps kube-dns as the in-cluster DNS provider and uses the kube-dns ConfigMap (stubDomains) to direct queries for corp.example.com to the on-premises DNS server while preserving *.internal resolution via the metadata server (169.254.169.254). It then attempts to expose cluster DNS records to on-premises clients through an inbound DNS server policy on hub-vpc and a Cloud DNS peering zone targeting spoke-vpc.
kube-dns operates strictly inside the cluster and stores Service records only within its in-cluster Pods. It does not publish headless Service endpoint IPs into a Cloud DNS VPC-scoped private zone, so neither non-GKE VPC clients nor a Cloud DNS peering zone in hub-vpc can resolve them.cluster.local: Peering cluster.local in Cloud DNS does not expose kube-dns records, and on-premises clients are configured to query prod.gke.example.com rather than cluster.local.kube-dns Pods to 10.200.1.10 originate from GKE Pod/node IPs rather than Cloud DNS's 35.199.192.0/19 range, which bypasses centralized Cloud DNS forwarding and fails if spoke-vpc Pod CIDR ranges lack transitive reachability or firewall permissions on-premises.kube-dns visibility: kube-dns resolves *.cluster.local only for Pods running inside that specific cluster.kube-dns and requires Cloud DNS for GKE with VPC scope (or additive VPC scope).stubDomains scope: In kube-dns, stubDomains applies only to Pod DNS queries, not to node-level processes.On-premises clients did not need to resolve GKE headless Services (only LoadBalancer or internal load balancer IPs published manually in a Cloud DNS private zone), and Pod/node IP ranges in spoke-vpc had direct routed connectivity and firewall access to 10.200.1.10 across hub-vpc.
prod.gke.example.com) and recreate the node pools. Create a Cloud DNS forwarding zone for corp.example.com targeting 10.200.1.10 authorized for both hub-vpc and spoke-vpc, attach an inbound DNS server policy to hub-vpc, create a DNS peering zone from hub-vpc to spoke-vpc for prod.gke.example.com, and forward prod.gke.example.com from on-premises to the hub-vpc inbound forwarder IP.This option deploys Cloud DNS for GKE in VPC scope (prod.gke.example.com), sets up inbound DNS forwarding on hub-vpc, peers prod.gke.example.com from hub-vpc to spoke-vpc, and creates a Cloud DNS forwarding zone for corp.example.com targeting 10.200.1.10. To allow GKE Pods in spoke-vpc to query corp.example.com, it directly authorizes both hub-vpc and spoke-vpc on that single forwarding zone.
spoke-vpc has Layer 3 reachability to on-premises via VPC peering and Cloud Router custom route advertisements, DNS queries sent by Cloud DNS from spoke-vpc will fail.35.199.192.0/19: Google Cloud accepts DNS responses from on-premises servers only if they return to the exact VPC network from which the query originated. Because all VPCs use the same 35.199.192.0/19 source range for standard outbound forwarding, authorizing multiple VPCs on a forwarding zone targeting the same on-premises DNS servers causes asymmetric or broken routing.hub-vpc) that directly hosts the hybrid connectivity (Cloud Interconnect or Cloud VPN).spoke-vpc were not directly authorized on the forwarding zone, and instead a Cloud DNS peering zone for corp.example.com were created in spoke-vpc targeting hub-vpc (or if Cloud DNS outbound endpoints in hub-vpc were bound to a forwarding zone in spoke-vpc).
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated