Google Professional Cloud Developer Question 257
Select 3Google Cloud PlatformYou are building a CI/CD pipeline for a containerized application using Google Cloud services. The pipeline should automatically build container images, store them securely, and deploy them to a staging Google Kubernetes Engine (GKE) cluster. Which combination of actions will correctly achieve this objective?
- A
Use Cloud Build to define a build pipeline that builds the container image from the source code and pushes it to Artifact Registry.
- B
Store the container image in Google Cloud Storage for future deployments.
- C
Configure Artifact Registry to securely store the container image.
- D
Set up a Cloud Build trigger to deploy the container image from Artifact Registry to the staging GKE cluster.
- E
Use a Virtual Machine to manually build and deploy the container image to GKE.
Show answer and explanation
Correct answers: A, C, D
Explanation
To set up a CI/CD pipeline for a containerized application on Google Cloud, you should use Cloud Build to automate the building of container images and Artifact Registry to securely store them. Additionally, Cloud Build triggers can automate deployments to GKE clusters, ensuring a streamlined and efficient pipeline. This approach leverages managed Google Cloud services, ensuring security, scalability, and best practices for CI/CD pipelines.
- A. Correct.
Correct: Cloud Build is the recommended service to automate the build process and push container images to Artifact Registry.
- B. Incorrect.
Incorrect: Google Cloud Storage is not intended for storing container images; Artifact Registry is the appropriate service for this purpose.
- C. Correct.
Correct: Artifact Registry is designed to securely store container images and other artifacts, making it the right choice for this use case.
- D. Correct.
Correct: A Cloud Build trigger can automate the deployment of container images from Artifact Registry to a GKE cluster, streamlining the CI/CD pipeline.
- E. Incorrect.
Incorrect: Using a Virtual Machine to manually build and deploy the container image does not align with the automated and scalable nature of a CI/CD pipeline.