Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud DevOps Engineer practice bank has 1,455 more like it. Try 10 free: instant score, no account.
Your DevOps engineering team is automating a zero-downtime infrastructure migration pipeline using Cloud Build. The pipeline provisions a target GKE cluster with Cloud Service Mesh alongside an existing GKE cluster hosting production microservices.
You need to implement a canary deployment strategy within the automated pipeline that safely shifts live user traffic in small increments to validate workload reliability on the new cluster while maintaining an immediate rollback mechanism.
Which strategy should you implement in your pipeline?
In standard Kubernetes deployments, updating an existing deployment resource initiates a rolling update of Pods inside the same cluster and namespace. If failures occur, running kubectl rollout undo reverts the Kubernetes Deployment object to a previous revision in the rollout history.
kubectl rollout undo still incurs pod termination and recreation overhead.The scenario involved updating application container image tags within an established single-cluster deployment rather than performing an infrastructure migration to a newly provisioned mesh-enabled cluster.
Blue/Green deployment involves running two identical production environments (Blue and Green). Once the Green environment is deployed and ready, routing components (such as an external Application Load Balancer backend service) are updated to redirect all incoming production traffic from Blue to Green at once (100% cutover).
The application required strict atomic cutovers where running two active versions simultaneously would cause data inconsistency, or if canary traffic splitting was explicitly prohibited.
Weighted DNS routing is a mechanism where a DNS server returns different IP addresses in response to DNS queries based on assigned statistical weights. When clients resolve the domain name, the authoritative nameserver hands out records according to the configured distribution ratios.
The workload was running completely without a service mesh or global HTTP(S) load balancer, and multi-region coarse traffic distribution with acceptable TTL propagation delay was sufficient.
Cloud Service Mesh (and Istio-based service mesh architectures) provides advanced Layer 7 traffic routing and management capabilities across Kubernetes clusters and namespaces. Through custom resource definitions like ServiceEntry and VirtualService, network traffic can be precisely manipulated at the ingress proxy level without modifying client code or relying on external DNS propagation.
ServiceEntry informs the source cluster's mesh of the external IP address for the target cluster's asm-ingressgateway. The accompanying VirtualService can specify fine-grained traffic weights (e.g., routing 5% or 10% of requests to the target cluster endpoint).VirtualService traffic weight back to 100% on the source cluster (or 0% to the target), which instantly reverts traffic without infrastructure teardown or DNS cache delays.Using native service mesh primitives (ServiceEntry and VirtualService) is the Google-recommended pattern for canary migrations between clusters. It isolates blast radius effectively, leverages existing ingress gateways, and integrates seamlessly into automated CI/CD steps in Cloud Build.
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