Ultimate access to all questions.
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?
Explanation:
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.