Google Professional Cloud DevOps Engineer Question 235
Single answerGoogle Cloud PlatformYou are managing a production application running on Google Kubernetes Engine (GKE) with a Deployment that uses a Service of type LoadBalancer to expose the application. Due to a critical issue, you need to stop serving traffic from the current version of the application and redirect all incoming traffic to a maintenance page hosted on a Cloud Storage bucket. How can you achieve this with minimal disruption to users?
- A
Update the Service to point to a new Pod running the maintenance page.
- B
Scale down the Deployment to zero replicas and update the LoadBalancer backend to point to the Cloud Storage bucket.
- C
Create a URL map with a backend bucket pointing to the Cloud Storage bucket and update the LoadBalancer configuration to use the new URL map.
- D
Delete the existing Deployment and create a new Deployment serving the maintenance page.
Show answer and explanation
Correct answer: C
Explanation
To redirect traffic with minimal disruption, you should leverage the flexibility of URL maps in Google Cloud. By configuring a URL map with a backend bucket pointing to the maintenance page hosted in a Cloud Storage bucket, you can seamlessly redirect traffic without altering the existing LoadBalancer configuration or causing unnecessary downtime. This approach ensures that users are redirected to the maintenance page efficiently and without impacting the overall infrastructure.
- A. Incorrect.
This is not a recommended solution as updating the Service to point to a new Pod would require creating and deploying a new Pod, which introduces unnecessary complexity and delays.
- B. Incorrect.
Scaling down the Deployment to zero replicas would stop serving traffic, but modifying the LoadBalancer backend directly is not a supported or efficient way to redirect traffic in this scenario.
- C. Correct.
This is the correct answer. Using a URL map with a backend bucket allows you to redirect traffic to the Cloud Storage bucket hosting the maintenance page without disrupting the LoadBalancer’s existing configuration.
- D. Incorrect.
Deleting the Deployment would result in downtime and is not a recommended approach as it does not provide a seamless redirection to the maintenance page.