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 runs a VPC-native GKE Standard cluster with GKE Dataplane V2 and Private Service Connect (PSC) inside a VPC Service Controls perimeter. Private Google Access is enabled on the subnet, with DNS resolving *.googleapis.com to restricted.googleapis.com.
You enforce strict defense-in-depth controls:
65535 egress deny all (0.0.0.0/0) VPC firewall rule on cluster nodes.NetworkPolicy in the payments namespace, and an ingress NetworkPolicy with ipBlock: 203.0.113.0/24 protecting Pods behind a LoadBalancer Service.Workloads now fail to reach Google APIs or the control plane, and valid traffic from 203.0.113.0/24 is dropped.
Which configuration changes should you implement?
This option assumes GKE's automatically provisioned VPC firewall rules handle all cluster-internal egress, replaces GKE Dataplane V2 with Calico, and adds an except clause excluding the Pod CIDR to the ingress ipBlock rule.
gke-[cluster]-all and gke-[cluster]-vms) and depends on Google Cloud's implied allow-egress rule. Once a priority 65535 egress deny all rule is introduced, node-to-Pod, control plane (TCP 443), and Konnectivity (TCP 8132) outbound packets are dropped unless explicit higher-priority VPC egress allow rules are configured.LoadBalancer source-IP rewriting: Switching from GKE Dataplane V2 to Calico changes the CNI enforcement engine (from eBPF to iptables), not how externalTrafficPolicy: Cluster handles LoadBalancer routing. External traffic still arrives at Pods with the node IP as the source address.ipBlock except clause: In GKE Dataplane V2, ipBlock rules cover Pod IP addresses as well as external IPs. Adding except: ['POD_IP_RANGE'] prevents broad rules like 0.0.0.0/0 from unintentionally permitting Pod-to-Pod traffic, but it does not help 203.0.113.0/24 match a SNATed node IP.NetworkLogging without requiring kube-proxy or Calico.There were no egress-deny VPC firewall rule blocking cluster infrastructure traffic and the LoadBalancer Service already used externalTrafficPolicy: Local, while the ingress ipBlock was 0.0.0.0/0 rather than a specific partner CIDR.
Combining VPC firewall rules, Kubernetes Network Policies enforced by GKE Dataplane V2, and Service traffic policies creates multi-layered security across both the node VM boundary and the Pod network namespace. Because VPC-native GKE clusters assign natively routable alias IP ranges to Pods, traffic must satisfy both VPC-level node rules and eBPF-enforced Pod-level rules.
65535) allow-egress rule. Adding a custom 65535 egress deny all rule blocks node-to-Pod, node-to-node, control plane (TCP 443), Konnectivity (TCP 8132), and Private Google Access traffic unless higher-priority egress allow rules are added. Allowing 199.36.153.4/30 (restricted.googleapis.com) permits Google API access inside the VPC Service Controls perimeter.NetworkPolicy in payments, Pods must explicitly allow UDP/TCP port 53 to kube-system for DNS resolution, 199.36.153.4/30 for restricted Google API VIPs, and the PSC control plane's internal privateEndpoint IP address.ipBlock: Setting externalTrafficPolicy: Local prevents cross-node forwarding and SNAT by the receiving node, ensuring backend Pods see the original client IP (203.0.113.0/24) rather than a node IP.restricted.googleapis.com VIP range.NetworkLogging visibility natively through GKE Dataplane V2.LoadBalancer traffic.Unlike approaches that loosen ipBlock rules to permit all node IPs or route to private.googleapis.com, this design fixes every broken layer—VPC egress, Pod egress, and Service source-IP preservation—without weakening the security perimeter.
This configuration attempts to permit Google API traffic using the private.googleapis.com VIP range (199.36.153.8/30), allows Pod egress to the GKE-managed ClusterIP range (34.118.224.0/20), and expands the ingress ipBlock to include the Pod CIDR while retaining externalTrafficPolicy: Cluster.
restricted.googleapis.com (199.36.153.4/30). Allowing only 199.36.153.8/30 does not match the DNS resolution to the restricted VIPs, leaving Google API calls blocked.privateEndpoint IP allocated from master-ipv4-cidr or the cluster's node subnet, not from the Service ClusterIP range (34.118.224.0/20). Furthermore, NetworkPolicy evaluates post-translation endpoint IPs rather than ClusterIPs.LoadBalancer traffic: Under externalTrafficPolicy: Cluster, traffic arriving at a node is SNATed to the node's internal IP address before reaching the destination Pod. Adding the Pod CIDR to ipBlock does not match the node's primary subnet IP, so requests from 203.0.113.0/24 continue to be rejected.199.36.153.8/30 provides Private Google Access for services outside VPC Service Controls enforcement.34.118.224.0/20 is the default GKE-managed IPv4 address pool reserved exclusively for internal Kubernetes Service ClusterIPs.externalTrafficPolicy: Cluster obscures external client source IPs behind node IPs, making source-IP-based NetworkPolicy filtering ineffective without permitting all node IPs.The cluster were not inside a VPC Service Controls perimeter (using private.googleapis.com instead), allowed the actual PSC privateEndpoint IP for control plane egress, and set externalTrafficPolicy: Local on the Service.
This approach correctly opens required VPC egress firewall rules, modifies the IP masquerade agent (ip-masq-agent) nonMasqueradeCIDRs list, and relocates the namespace egress rules into a Baseline tier ClusterNetworkPolicy.
Baseline tier rules are overridden: GKE evaluates network policies in three hierarchical tiers: Admin tier (ClusterNetworkPolicy), NetworkPolicy tier (standard NetworkPolicy), and Baseline tier (ClusterNetworkPolicy). Because the Baseline tier has the lowest precedence, the existing default-deny NetworkPolicy in the payments namespace overrides the Baseline rules, keeping DNS and 199.36.153.4/30 blocked.privateEndpoint: Without an explicit allow rule for the control plane's internal privateEndpoint IP in an active higher-precedence policy, Pods remain unable to reach the Kubernetes API server over Private Service Connect.ip-masq-agent does not affect inbound LoadBalancer SNAT: The ip-masq-agent only controls whether outbound traffic originating from Pods is SNATed to the node's IP address when leaving the cluster. It has no control over inbound LoadBalancer SNAT caused by externalTrafficPolicy: Cluster, so partner traffic from 203.0.113.0/24 continues to fail the ingress ipBlock check.ClusterNetworkPolicy (Admin tier) enforces mandatory, non-overridable guardrails, whereas Baseline tier establishes default guardrails that namespace-level NetworkPolicy objects can override.nonMasqueradeCIDRs preserves Pod source IPs for outbound traffic destined to listed CIDRs, such as RFC 1918 ranges or VPC subnets.The Baseline egress policy were removed in favor of updating the NetworkPolicy tier (or using an Admin tier ClusterNetworkPolicy including the PSC privateEndpoint) and externalTrafficPolicy: Local replaced the ip-masq-agent change.
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