
Answer-first summary for fast verification
Answer: Review the Stackdriver logs for the specific GKE container that is serving the unresponsive part of the application.
The most effective approach to diagnose the issue is to review the Stackdriver logs for the specific GKE container that is serving the unresponsive part of the application. GKE is integrated with Google Cloud's logging services (formerly known as Stackdriver), which automatically collects logs from your containers and stores them centrally. By inspecting these logs, you can quickly identify any errors or issues within the specific container. Other options are less suitable: reviewing each Compute Engine instance's logs or serial port logs would be cumbersome and might not provide relevant insights, and connecting directly to a container to read logs is unnecessary when you have access to centralized logging.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You are managing a Kubernetes Engine (GKE) cluster that hosts a web application. Recently, users have reported that a specific part of the application is no longer responding. Upon investigation, you observe that all pods in your deployment are continuously restarting every 2 seconds. Given that the application writes its logs to standard output, you need to inspect these logs to diagnose and resolve the issue. What is the most effective approach you can use to view the logs?
A
Review the Stackdriver logs for each Compute Engine instance that is serving as a node in the cluster.
B
Review the Stackdriver logs for the specific GKE container that is serving the unresponsive part of the application.
C
Connect to the cluster using gcloud credentials and connect to a container in one of the pods to read the logs.
D
Review the Serial Port logs for each Compute Engine instance that is serving as a node in the cluster.