Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Associate Cloud Engineer practice bank has an additional 2,014 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your company runs a web service on Google Kubernetes Engine (GKE) and is rolling out an updated version of the application. You want to execute a canary release by routing 90% of incoming HTTP user traffic to the stable production Service (v1-service) and 10% to the new release Service (v2-service).
Which GKE traffic management resource should you configure to implement this traffic split?
A NetworkPolicy is a Kubernetes security specification that controls network communication between pod groups and network endpoints. It acts as a distributed packet firewall at Layers 3 and 4, allowing administrators to define which pods can send (egress) or receive (ingress) network packets.
You needed to enforce network security boundaries, such as blocking the v2 canary pods from communicating with an unapproved backend database or restricting access to specific namespaces.
Network policies must be enabled via the GKE Network Policy engine or Dataplane V2. They complement traffic routing resources by securing pod-to-pod communication but play no role in external load balancing or traffic splitting.
A Kubernetes Service of type LoadBalancer creates an external Layer 4 (TCP/UDP) network load balancer in Google Cloud. It provides a single stable IP address and balances network traffic evenly across all pods that match its selector labels.
weight field for splitting percentages between different Services.LoadBalancer operates at Layer 4 (transport layer) rather than Layer 7 (HTTP layer), making it unsuitable for advanced HTTP request routing and fine-grained canary percentages.v1 and 1 pod of v2 under the same selector, which wastes compute resources and lacks operational flexibility.Your requirement was simply to expose a single TCP-based containerized workload directly to the internet with basic Layer 4 load balancing across all backend instances.
While pod-ratio scaling was an early workaround for canary testing in Kubernetes, modern GKE architectures use Layer 7 solutions like the Gateway API or Service Mesh to control traffic weights independently of pod replica counts.
The Gateway API in Google Kubernetes Engine (GKE) is a modern, standards-based specification for service networking and ingress. Within this API, the HTTPRoute resource defines routing rules for HTTP and HTTPS traffic, allowing advanced traffic management capabilities such as header matching, URL rewrites, and weighted traffic distribution across multiple backend Kubernetes services.
rules.backendRefs, the HTTPRoute manifest accepts multiple target Services and assigns an integer weight to each.90 to v1-service and a weight of 10 to v2-service, the underlying Google Cloud Load Balancer distributes 90% of requests to the stable version and 10% to the canary deployment.HTTPRoute manifest without modifying application pods or recreating network load balancers.Gateway resources) from application routing rules (managed by application developers via HTTPRoute resources).The GKE Gateway API is Google Cloud's recommended next-generation solution for L7 ingress and advanced traffic routing. Unlike traditional Ingress objects that require vendor-specific annotations for basic traffic splits, HTTPRoute natively defines weighted multi-backend routing as part of the core specification.
A standard Kubernetes Ingress resource manages external HTTP/HTTPS access to services within a cluster. It defines rules based on request hostnames and URL paths (such as routing /api to one Service and /static to another).
Ingress specification only supports path-based and host-based routing. It does not provide native syntax to split traffic dynamically across multiple backends for the same URL path.path entries routes distinct URL endpoints to distinct Services (e.g., /v1 vs /v2), which requires clients to explicitly call different URLs rather than transparently receiving the 90/10 canary split on the main application endpoint.example.com/app) rather than distributing identical requests probabilistically.The objective was to route users to different microservices based on distinct URL prefixes (e.g., /orders and /catalog) rather than performing a percentage-based canary release across identical endpoints.
Although some third-party Ingress controllers offer custom vendor annotations for canary routing, standard GKE Ingress does not offer native declarative traffic splitting, making the Gateway API the recommended mechanism in GKE.
Change the inputs and watch how the outcome changes.

Choose which resource routes incoming HTTP traffic and what objective it should serve, then watch how requests flow.
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