
Answer-first summary for fast verification
Answer: Create a cron job to terminate any Pods that have been running for more than five hours.
The issue described involves a microservice in GKE where Pods start returning 403 errors after running for more than five hours. The development team is working on a fix, but it will take a month. The goal is to ensure continued operations with minimal steps and following Google-recommended practices. Option A suggests creating a cron job to terminate Pods running for more than five hours, which directly addresses the symptom of the issue by preventing Pods from reaching the state where they return 403 errors. This is a proactive approach that automates the solution with minimal manual intervention. Option B, adding a HTTP liveness probe, would not directly address the issue since the problem is not about the Pod's liveness but about its behavior after a certain runtime. Option C, monitoring and manually terminating Pods, is less efficient than automating the process with a cron job. Option D, configuring an alert, would only notify you of the issue without providing a solution to prevent or mitigate the 403 errors. Therefore, the best approach is Option A, as it automates the solution with minimal steps and follows Google's recommendation for automation and efficiency.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Your application runs on Google Kubernetes Engine (GKE) with multiple microservices deployed using Deployments and Services. One microservice's Pod starts returning 403 errors after running for over five hours. The development team is addressing the issue, but the fix will take a month. You need to maintain operations until the fix is deployed while adhering to Google-recommended practices with minimal steps. What should you do?
A
Create a cron job to terminate any Pods that have been running for more than five hours.
B
Add a HTTP liveness probe to the microservice's deployment.
C
Monitor the Pods, and terminate any Pods that have been running for more than five hours.
D
Configure an alert to notify you whenever a Pod returns 403 errors.
No comments yet.