mediumMultiple ChoiceObjective-mapped
Google ACE Practice Question: Microservices in a GKE cluster need to discover…
Microservices in a GKE cluster need to discover each other by name without using public DNS. Service A calls Service B at `http://service-b.production.svc.cluster.local`. Which GCP/Kubernetes feature provides this internal DNS resolution?
⚠ Common exam trap
Watch out — candidates often confuse Cloud DNS (a GCP-managed DNS service for VPCs) with Kubernetes cluster DNS, or assume that a service mesh like Anthos is necessary for internal service discovery, when in fact CoreDNS provides this capability out of the box in any standard GKE cluster.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Kubernetes cluster DNS (CoreDNS) resolving Service names within the cluster
Kubernetes cluster DNS, typically implemented by CoreDNS, is the built-in mechanism that resolves Service names like `service-b.production.svc.cluster.local` to the corresponding ClusterIP. This allows Pods to discover each other by name without relying on external or public DNS. CoreDNS runs as a Deployment in the kube-system namespace and automatically creates DNS records for every Service based on its name and namespace.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Cloud DNS private zone configured for the cluster's namespace
Why it's wrong here
Cloud DNS private zones resolve names within your VPC network, such as internal VM hostnames or custom domains like `example.internal`. Pods do not use Cloud DNS for `svc.cluster.local` resolution; they query the cluster's CoreDNS, which listens on the cluster's service IP (e.g., `10.96.0.10`) and knows about Services in every namespace. A private zone for a namespace would also not work because the DNS domain is cluster-wide and not namespace-scoped, and Cloud DNS cannot see Kubernetes Service names unless you implement custom syncing.
- ✓
Kubernetes cluster DNS (CoreDNS) resolving Service names within the cluster
Why this is correct
CoreDNS is the standard in-cluster DNS server for Kubernetes. It automatically creates DNS records for every Service in the format `[service].[namespace].svc.cluster.local`, so Pods can resolve those names to cluster IPs and reach Services without hardcoding IPs. This built-in DNS is the foundation of service-to-service discovery on GKE, requiring no additional configuration or external DNS infrastructure.
- ✗
Anthos Service Mesh — required for service-to-service DNS
Why it's wrong here
Anthos Service Mesh (ASM) is an Istio-based service mesh that provides traffic management, observability, and mTLS for microservices. It does not provide DNS resolution; Kubernetes clusters already include CoreDNS for that purpose. ASM operates at Layer 7, intercepting and routing HTTP/gRPC traffic between services, but it relies on the cluster's existing DNS to identify service endpoints. Removing CoreDNS breaks service discovery even if ASM is installed.
- ✗
A custom /etc/hosts entry on each Pod
Why it's wrong here
Adding manual entries to each Pod's `/etc/hosts` is unworkable because Pods are ephemeral—their IPs change on recreation, and each Pod would need its own copy of the file. Kubernetes Services provide a stable virtual IP and DNS name, so there is no need for host-file management. Maintaining `etc/hosts` across many Pods is error-prone and cannot scale, and it would not handle namespace-qualified service names or automatic updates when Services are created or removed.
Visual reference
Go deeper
Related to this question
Learn chapter
Google Kubernetes Engine (GKE)
Key term
Service
A service is a software component or system that performs a specific function and is available to be used by other programs or users over a network.
Key term
Kubernetes cluster
A set of machines, called nodes, that work together to run and manage containerized applications using Kubernetes orchestration software.
About these practice questions
Courseiva writes every ACE question from scratch — 769 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.