Google Professional Cloud DevOps Engineer Question 76
Select 4Google Cloud PlatformYou are deploying a new version of your application to Google Kubernetes Engine (GKE) using a CI/CD pipeline. After the deployment, you notice that the application is returning HTTP 500 errors. Upon investigation, you find that the new version is failing to connect to the database due to a configuration issue. Which of the following actions should you take to troubleshoot and mitigate this issue effectively?
- A
Rollback to the previous stable version using your deployment strategy.
- B
Inspect the application logs for connection errors to identify the root cause.
- C
Update the database configuration in the deployment manifest and redeploy.
- D
Manually update the database connection string in the running pods.
- E
Use a canary deployment strategy to test the fix on a subset of users before full rollout.
Show answer and explanation
Correct answers: A, B, C, E
Explanation
When encountering deployment issues like HTTP 500 errors, it is crucial to take a structured approach: roll back to maintain availability, analyze logs to identify the root cause, fix the issue in your deployment configuration, and use a safe deployment strategy like canary to validate the fix. Avoid manual changes to running pods as they are not persistent and deviate from best practices.
- A. Correct.
Rolling back to the previous stable version ensures application availability while you investigate the issue, making it a critical first step.
- B. Correct.
Inspecting application logs is necessary to pinpoint the root cause of the error, which is essential for applying the correct fix.
- C. Correct.
Updating the database configuration in the deployment manifest aligns with the Infrastructure-as-Code principle and ensures the fix is persistent across deployments.
- D. Incorrect.
Manually updating the database connection string in running pods is not recommended because it is not persistent and violates best practices for managing configurations in Kubernetes.
- E. Correct.
Using a canary deployment strategy allows you to test the fix on a small percentage of traffic, reducing the risk of widespread impact if the issue persists.