Google Professional Cloud DevOps Engineer Question 61
Single answerGoogle Cloud PlatformYou are managing a CI/CD pipeline for a new application that uses Google Kubernetes Engine (GKE). You want to test a new version of the application in the pipeline while ensuring it does not affect users of the current live version. Which approach should you use?
- A
Deploy the new version to a separate namespace in the GKE cluster for testing.
- B
Use a rolling update strategy to gradually replace the current version with the new version.
- C
Deploy the new version alongside the current version using a canary deployment strategy.
- D
Directly replace the current version with the new version in the production environment.
Show answer and explanation
Correct answer: A
Explanation
Testing a new application version in the pipeline should occur in an isolated environment to avoid impacting live users. Deploying the new version to a separate namespace in the GKE cluster ensures this isolation, allowing thorough testing before promoting the version to production.
- A. Correct.
Deploying the new version to a separate namespace isolates the test environment from the live environment, ensuring no impact on current users. This is the best approach for testing in the pipeline.
- B. Incorrect.
A rolling update strategy replaces the current version incrementally, but it introduces the new version to users during the update process, which is not suitable for isolated testing.
- C. Incorrect.
A canary deployment strategy runs both versions simultaneously for a subset of users, but it still impacts live traffic, making it less ideal for pipeline testing.
- D. Incorrect.
Replacing the current version directly in production disrupts the live environment and is not suitable for testing a new application version.