Google Professional Cloud DevOps Engineer Question 62
Select 2Google Cloud PlatformYour team is deploying a new version of a web application to Google Kubernetes Engine (GKE) using a CI/CD pipeline. To ensure the new version does not introduce regressions, you want to automatically run integration and performance tests before the new version is rolled out to production. Which steps should you include in your pipeline to achieve this?
- A
Use a canary deployment strategy and monitor application metrics during the testing phase.
- B
Run the integration and performance tests in a staging environment before deploying to production.
- C
Deploy the new version directly to production and rely on monitoring alerts to detect regressions.
- D
Incorporate automated testing as a separate stage in the CI/CD pipeline before staging deployment.
- E
Manually verify test results after each pipeline stage to confirm the new version is stable.
Show answer and explanation
Correct answers: B, D
Explanation
To test a new application version in the pipeline effectively, it is important to incorporate automated testing early in the CI/CD process and use a staging environment for integration and performance tests. This ensures issues are identified and resolved before the new version reaches production, aligning with DevOps best practices for reliability and automation.
- A. Incorrect.
Using a canary deployment strategy is a valid approach for production testing, but it does not replace the need for pre-production integration and performance tests in a controlled environment.
- B. Correct.
Running tests in a staging environment is a best practice to ensure the new version is stable and does not introduce regressions before reaching production.
- C. Incorrect.
Deploying directly to production without pre-production testing is risky and not recommended for a DevOps workflow focused on reliability.
- D. Correct.
Automated testing in the CI/CD pipeline ensures consistent and repeatable validation of the new version before advancing it further in the deployment process.
- E. Incorrect.
Manual verification introduces delays and human error, making it less effective compared to automated testing in a DevOps pipeline.