Google Professional Cloud DevOps Engineer Question 28
Select 3Google Cloud PlatformYou are a DevOps engineer tasked with designing a Continuous Delivery (CD) pipeline using Google Cloud Deploy for a microservices application. The application consists of multiple environments (dev, staging, and production), and each environment has unique configuration requirements. You decide to use Kustomize with Cloud Deploy to manage environment-specific configurations. What steps should you take to ensure the pipeline is configured properly?
- A
Create separate Kustomize overlays for each environment and reference them in the Cloud Deploy delivery pipeline.
- B
Use Skaffold profiles to dynamically switch Kustomize overlays based on the target environment.
- C
Configure Cloud Deploy to directly modify the base configuration files for each environment.
- D
Define a Cloud Deploy delivery pipeline YAML file and specify the Kustomize overlays for each target environment.
- E
Use Skaffold to build and deploy artifacts, but skip using Cloud Deploy since Skaffold handles CD entirely.
Show answer and explanation
Correct answers: A, B, D
Explanation
To implement a Continuous Delivery pipeline with Cloud Deploy and Kustomize, you need to manage environment-specific configurations using Kustomize overlays and integrate them into the Cloud Deploy pipeline. Skaffold profiles can be used to switch overlays dynamically, and the Cloud Deploy delivery pipeline YAML file must reference these configurations. Avoid modifying base configuration files directly or relying solely on Skaffold for CD, as Cloud Deploy offers features specifically designed for managing multi-environment deployments.
- A. Correct.
Correct: Creating separate Kustomize overlays for each environment ensures that environment-specific configurations can be properly managed and applied during deployment.
- B. Correct.
Correct: Skaffold profiles can be used to dynamically switch Kustomize overlays based on the target environment, enabling seamless integration with Cloud Deploy.
- C. Incorrect.
Incorrect: Cloud Deploy should not directly modify base configuration files. Instead, overlays and tools like Kustomize should be used to manage configuration differences between environments.
- D. Correct.
Correct: Defining a Cloud Deploy delivery pipeline YAML file and specifying the Kustomize overlays for each target environment ensures that the pipeline knows how to apply environment-specific configurations during deployment.
- E. Incorrect.
Incorrect: While Skaffold can handle build and deployment tasks, it is not a replacement for Cloud Deploy in this scenario since Cloud Deploy provides advanced CD capabilities like release tracking and approvals.