
Answer-first summary for fast verification
Answer: Create a new tag called stable that points to the previously working container, and change the deployment to point to the new tag., Alter the deployment to point to the sha256 digest of the previously working container.
The question addresses a scenario where a recently updated container image is causing issues in a production application running on GKE. The deployment is currently using the 'latest' tag, which is not recommended for production due to its mutable nature. The goal is to revert to a previously working version of the container. Option A suggests creating a new 'stable' tag pointing to the previously working container and updating the deployment to use this tag. This is a valid approach as it avoids using mutable tags like 'latest'. Option B recommends pointing the deployment to the sha256 digest of the previously working container. This is also a valid approach because digests are immutable and ensure the exact version of the container is used. Option C suggests building a new container from a previous Git tag and performing a rolling update. While this could work, it's more complex and time-consuming than necessary. Option D proposes applying the 'latest' tag to the previous container image and doing a rolling update. This is not recommended because it continues to rely on the mutable 'latest' tag, which could lead to similar issues in the future. Therefore, the correct answers are A and B, as they both provide reliable and immutable ways to revert to a working container version.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You are troubleshooting problems in your production application running on Google Kubernetes Engine (GKE). You identified that the issue stems from a recently updated container image, though the specific code change remains unknown. The deployment currently uses the latest tag. How should you modify your cluster to run a known working version of the container?
A
Create a new tag called stable that points to the previously working container, and change the deployment to point to the new tag.
B
Alter the deployment to point to the sha256 digest of the previously working container.
C
Build a new container from a previous Git tag, and do a rolling update on the deployment to the new container.
D
Apply the latest tag to the previous container image, and do a rolling update on the deployment.