You host an image-resize service in the same GKE cluster as its callers. Clients need to reach the service by name or IP. How should clients locate the service?
Choose an answer
Tap an option to check your answer.
Correct answer: Define a Kubernetes Service. Clients use the Service name in the URL to connect to it..
Why this is the answer
The correct approach is to define a Kubernetes Service. Within a GKE cluster, Kubernetes automatically provides DNS resolution for Services. Clients can directly use the Service name (e.g., my-image-resize-service) as the hostname in their requests, and the cluster's DNS will resolve it to the Service's cluster IP, which then load-balances requests to the underlying pods. Defining a Kubernetes Service and resolving its cluster IP via a Cloud DNS A record is unnecessary and overly complex for in-cluster communication. Cloud DNS is typically used for external DNS resolution, not for internal cluster services. Defining a Kubernetes Endpoint directly is not how clients typically discover services. Endpoints are managed by Kubernetes and point to the actual pod IPs; they are usually consumed by Services, not directly by clients. Clients should interact with the stable Service IP/name. Reading an endpoint name from an environment variable or looking it up via Cloud DNS are not standard or scalable methods for service discovery within Kubernetes.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed