nerdexam
GoogleGoogle

PROFESSIONAL-CLOUD-DEVELOPER · Question #363

PROFESSIONAL-CLOUD-DEVELOPER Question #363: Real Exam Question with Answer & Explanation

The correct answer is B: Build a separate Docker image for each new version of the application, and tag it with the version. Tagging images with a unique version number for each build allows you to track specific versions of your application and roll back easily if needed. This approach avoids the issue of the latest tag being overwritten, as each versioned image is uniquely identifiable and immutable

Deploying Applications

Question

You maintain a CI/CD pipeline for an application running on GKE. You use Cloud Build to create container images and push the images to Artifact Registry. When you build the image, you use the latest tag in your pipeline. You recently had to roll back a deployment 24 hours after rollout. The rollback process was difficult because the latest tag had been overwritten. You need to prevent this issue in the future. You want to use the most efficient approach. What should you do?

Options

  • ARebuild the Docker image for each environment, and tag it with the specific environment name.
  • BBuild a separate Docker image for each new version of the application, and tag it with the version
  • CImplement Helm charts to manage your container deployments.
  • DUse a Docker registry to store the container images, and create separate repositories for each

Explanation

Tagging images with a unique version number for each build allows you to track specific versions of your application and roll back easily if needed. This approach avoids the issue of the latest tag being overwritten, as each versioned image is uniquely identifiable and immutable once built. By tagging images with version numbers, you can manage deployments and rollbacks more efficiently without ambiguity about which image version is deployed. Using Helm charts could help with deployment management but does not address the issue of image version tracking. Similarly, separate repositories for each version would add unnecessary

Topics

#CI/CD#Container Image Tagging#Artifact Registry#Deployment Management

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER PracticeBrowse All PROFESSIONAL-CLOUD-DEVELOPER Questions