Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Developer practice bank has an additional 608 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
You are deploying a multi-service web application to a single GKE cluster and need to expose it to external internet clients. Your deployment has the following requirements:
api.example.com and shop.example.com) and route requests by URL path (such as / and /api/v1) through a single HTTP(S) load balancer.Which configuration should you implement?
A NodePort Service reserves a static port (typically in the 30000–32767 range) on every node in the cluster and forwards incoming Layer 4 traffic to the matching backend Pods. When cluster nodes have public IP addresses and VPC firewall rules permit inbound connections on those ports, external clients can reach the Services by connecting directly to node IPs.
api.example.com and shop.example.com or URL path routing.NodePort operates at Layer 4 and cannot inspect HTTP requests or split traffic percentages across multiple service versions.kube-proxy or eBPF, increasing latency. Exposing node IPs directly also introduces single-node failure risks if a node restarts or scales down.You were testing a simple non-production TCP/UDP service on a cluster with public node IPs or using an external third-party load balancer that manually targets cluster node ports.
In production GKE environments, exposing applications directly through node IP addresses is discouraged; managed Layer 7 Application Load Balancers via Gateway API provide a stable virtual IP, health checks, and direct Pod routing.
The GKE Gateway controller implements the Kubernetes Gateway API, the modern, expressive successor to Ingress for provisioning Google Cloud Layer 7 Application Load Balancers. A Gateway resource defines the load balancer frontend (listeners, ports, protocols, and TLS certificates), while HTTPRoute resources define how HTTP(S) requests are matched and forwarded to backend ClusterIP Services. With container-native load balancing, GKE uses Network Endpoint Groups (NEGs) so the load balancer sends traffic directly to Pod IP addresses.
api.example.com and shop.example.com), while attached HTTPRoute rules route specific URL paths like / and /api/v1 to different backend Services.kube-proxy hops and distribute traffic evenly across healthy Pods.Unlike GKE Ingress, Gateway API provides native canary traffic splitting and richer routing controls. Unlike LoadBalancer or NodePort Services, it consolidates multiple HTTP(S) domains behind a single Layer 7 frontend while delivering optimal Pod-direct traffic distribution through NEGs.
A GKE Ingress resource configures a Layer 7 Application Load Balancer to route external HTTP and HTTPS traffic to Kubernetes Services based on hostnames and URL paths. When paired with a NodePort Service using externalTrafficPolicy: Cluster, traffic arrives at a cluster node on an allocated high-numbered port and can be forwarded across nodes to reach backend Pods.
NodePort with externalTrafficPolicy: Cluster routes load-balanced traffic to node IPs first, where kube-proxy or eBPF may forward packets to a Pod on a different node rather than routing directly to healthy Pods.You only needed simple host- and path-based HTTP(S) routing for an existing application without canary traffic splitting, and container-native Pod-direct routing was not required.
Even when GKE Ingress is configured with ClusterIP Services for container-native load balancing, it still lacks built-in weighted traffic splitting for canary releases, which is a primary capability of the Gateway API.
A Kubernetes Service of type LoadBalancer instructs GKE to provision a Layer 4 Passthrough Network Load Balancer (TCP or UDP). Enabling externalTrafficPolicy: Local preserves the client source IP and avoids cross-node forwarding hops, while weighted load balancing (networking.gke.io/weighted-load-balancing: pods-per-node) distributes new connections to nodes in proportion to how many healthy Pods run on each node.
LoadBalancer Service per microservice provisions a separate Layer 4 load balancer and external IP address for each service rather than consolidating multiple domains under one frontend.api.example.com or URL paths like /api/v1.Your workload used raw TCP or UDP protocols, required a dedicated external IP per Service, and needed connection balancing across nodes proportional to Pod density rather than Layer 7 routing.
While externalTrafficPolicy: Local avoids extra node-to-node hops for Layer 4 traffic, Application Load Balancers configured through Gateway API provide true Layer 7 routing and direct Pod targeting via NEGs.
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