Question 348 of 500

Quick Answer

The correct approach is to use Cloud DNS with Kubernetes Services of type ClusterIP. This works because ClusterIP services assign a stable virtual IP address and a fully qualified DNS name in the format <service>.<namespace>.svc.cluster.local, which Cloud DNS automatically registers and resolves within the GKE cluster. This allows pods to discover each other by name rather than hardcoding IPs, ensuring communication remains reliable even when pods are rescheduled or IPs change. On the Google Professional Cloud Developer exam, this question tests your understanding of how GKE’s native service discovery integrates with Cloud DNS, often appearing as a scenario where you must choose between ClusterIP, NodePort, or external DNS solutions. A common trap is selecting an external load balancer or manual IP assignment, but the key is that internal microservice communication relies on ClusterIP’s stable DNS entries. Memory tip: think “ClusterIP for cluster-internal IP” — the “C” in ClusterIP stands for “cluster,” and the DNS name always ends with “.svc.cluster.local.”

PCD Practice Question: Designing highly scalable, available, and reliable cloud-native applications

This PCD practice question tests your understanding of designing highly scalable, available, and reliable cloud-native applications. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A company is deploying a microservices application on Google Kubernetes Engine (GKE) and needs to ensure that services can discover each other without hardcoding IP addresses. Which approach should they use?

Question 1mediummultiple choice
Full question →

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

Use Cloud DNS with Kubernetes Services of type ClusterIP

Option C is correct because Kubernetes Services of type ClusterIP provide a stable virtual IP and DNS name (via Cloud DNS) that resolves to the service's ClusterIP, enabling pods to discover each other without hardcoding IP addresses. GKE integrates with Cloud DNS to automatically register service DNS names in the format <service>.<namespace>.svc.cluster.local, allowing microservices to communicate reliably even if pods are rescheduled or IPs change.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use environment variables injected into each pod

    Why it's wrong here

    Environment variables are static and not updated when services change.

  • Use a ConfigMap to store service endpoints

    Why it's wrong here

    ConfigMaps require manual maintenance and do not update dynamically.

  • Use Cloud DNS with Kubernetes Services of type ClusterIP

    Why this is correct

    GKE automatically creates DNS records for Services.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Use Cloud Load Balancing to route traffic between services

    Why it's wrong here

    Cloud Load Balancing is for external traffic, not internal service discovery.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse static configuration methods (environment variables or ConfigMaps) with dynamic service discovery, overlooking that Kubernetes' built-in DNS for ClusterIP services is the standard, automated solution for internal pod-to-pod communication.

Detailed technical explanation

How to think about this question

Under the hood, Kubernetes Services of type ClusterIP use iptables or IPVS rules on each node to load-balance traffic to the pods backing the service, while the cluster's DNS (typically CoreDNS) resolves the service name to the ClusterIP. This approach follows the DNS-based service discovery pattern (RFC 2782 for SRV records) and ensures that even if pods are recreated with new IPs, the service endpoint remains reachable via the same DNS name. In a real-world scenario, a payment microservice can call 'http://orders-service.default.svc.cluster.local:8080' without knowing the underlying pod IPs, enabling seamless scaling and self-healing.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PCD practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PCD practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PCD question test?

Designing highly scalable, available, and reliable cloud-native applications — This question tests Designing highly scalable, available, and reliable cloud-native applications — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Use Cloud DNS with Kubernetes Services of type ClusterIP — Option C is correct because Kubernetes Services of type ClusterIP provide a stable virtual IP and DNS name (via Cloud DNS) that resolves to the service's ClusterIP, enabling pods to discover each other without hardcoding IP addresses. GKE integrates with Cloud DNS to automatically register service DNS names in the format <service>.<namespace>.svc.cluster.local, allowing microservices to communicate reliably even if pods are rescheduled or IPs change.

What should I do if I get this PCD question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This PCD 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 PCD exam.