Question 93 of 500
Configuring access and securitymediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is Kubernetes NetworkPolicy restricting ingress to the data service to only Pods with the web app label. This is correct because NetworkPolicy is the native Kubernetes resource that enforces pod-level network isolation by controlling traffic at layer 3 or 4, allowing you to define precise ingress rules based on Pod labels rather than IP addresses. On the Google Associate Cloud Engineer exam, this scenario tests your understanding that NetworkPolicy operates independently of Service types—even if the data service uses a ClusterIP, a misconfigured or missing NetworkPolicy could leave it exposed. A common trap is assuming that a ClusterIP service alone provides security, but it only prevents external access, not internal pod-to-pod traffic. To remember: think of NetworkPolicy as a firewall for Pods, where labels act as the security group tags. A useful mnemonic is “Labels lock layers”—your Pod labels determine which layers of traffic are allowed.

Google ACE Configuring access and security Practice Question

This ACE practice question tests your understanding of configuring access and security. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. 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 GKE cluster hosts both a public-facing web application and an internal data processing service. The data processing service should only accept traffic from the web application Pods, not from the internet. Which Kubernetes feature enforces this policy?

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

Kubernetes NetworkPolicy restricting ingress to the data service to only Pods with the web app label

Kubernetes NetworkPolicy is the native Kubernetes resource that controls traffic flow at the IP address or port level (OSI layer 3 or 4). By defining an ingress rule that allows traffic only from Pods with a specific label (e.g., 'app: web-app'), you can restrict access to the data processing service exclusively to the web application Pods, regardless of whether the service is exposed via ClusterIP, NodePort, or LoadBalancer. This is the correct and recommended approach for pod-level network segmentation within a cluster.

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.

  • A VPC firewall rule blocking external traffic to the data service's Node IPs

    Why it's wrong here

    VPC firewall rules operate at the VM/node level, not the Pod level — they can't distinguish between Pods on the same node or enforce service-to-service policies within the cluster.

  • Kubernetes NetworkPolicy restricting ingress to the data service to only Pods with the web app label

    Why this is correct

    NetworkPolicies provide Pod-level firewall rules based on Pod label selectors. A policy on the data service allowing only ingress from the web app's Pod labels enforces the required isolation.

    Related concept

    Read the scenario before looking for a memorised answer.

  • IAP (Identity-Aware Proxy) configured on the data service

    Why it's wrong here

    IAP enforces identity-based access for external users — it's not designed for Pod-to-Pod traffic policy within a GKE cluster.

  • Using a private ClusterIP Service for the data service — it's automatically private

    Why it's wrong here

    ClusterIP Services are cluster-internal but accessible by any Pod in the cluster, not just the web application. NetworkPolicy is needed for Pod-to-Pod isolation.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Google Cloud often tests the misconception that a ClusterIP Service is inherently private and restricts access to only certain Pods, but in reality, ClusterIP only limits external exposure; any Pod in the cluster can reach it unless a NetworkPolicy explicitly denies or allows traffic based on labels.

Detailed technical explanation

How to think about this question

NetworkPolicy resources are implemented by a CNI plugin (e.g., Calico, Cilium, or GKE's Dataplane V2) that programs iptables or eBPF rules on each node. The policy uses podSelector and namespaceSelector to define allowed sources, and it applies to Pods selected by the policy's spec.podSelector. A common subtlety is that NetworkPolicy is 'allow-list' only — if any NetworkPolicy selects a Pod, all traffic not explicitly allowed is denied, which can break services if policies are not carefully crafted. In GKE, NetworkPolicy is enabled by default with Dataplane V2, which uses eBPF for better performance and observability.

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 company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.

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 ACE 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 ACE 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 ACE question test?

Configuring access and security — This question tests Configuring access and security — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Kubernetes NetworkPolicy restricting ingress to the data service to only Pods with the web app label — Kubernetes NetworkPolicy is the native Kubernetes resource that controls traffic flow at the IP address or port level (OSI layer 3 or 4). By defining an ingress rule that allows traffic only from Pods with a specific label (e.g., 'app: web-app'), you can restrict access to the data processing service exclusively to the web application Pods, regardless of whether the service is exposed via ClusterIP, NodePort, or LoadBalancer. This is the correct and recommended approach for pod-level network segmentation within a cluster.

What should I do if I get this ACE 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

Keep practising

More ACE practice questions

Last reviewed: Jun 30, 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 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.