Google Cloud Professional Cloud Architect — Question 26
You are running a cluster on Kubernetes Engine (GKE) to serve a web application. Users are reporting that a specific part of the application is not responding anymore. You notice that all pods of your deployment keep restarting after 2 seconds. The application writes logs to standard output. You want to inspect the logs to find the cause of the issue. Which approach can you take?
Answer options
- 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.
Correct answer: B
Explanation
The correct answer is B because reviewing the Stackdriver logs for the specific GKE container will provide the most relevant information regarding the issues affecting that part of the application. Options A and D focus on the Compute Engine instances, which are less likely to provide insight into the pod-specific issues, while option C involves accessing the container directly, which may not be necessary if the logs are already available in Stackdriver.