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?
Choose an answer
Tap an option to check your answer.
Correct answer: Review the Stackdriver logs for the specific GKE container that is serving the unresponsive part of the application..
Why this is the answer
The correct approach is to review Stackdriver logs for the specific GKE container. GKE automatically integrates with Cloud Logging (formerly Stackdriver Logging), and logs from containers running on GKE are automatically collected and centralized. This allows you to easily filter and view logs for specific pods and containers, which is crucial for diagnosing application-level issues like crashing pods. Reviewing Stackdriver logs for each Compute Engine instance (nodes) would provide infrastructure-level logs, not application logs from within the containers. Connecting to a container to read logs directly is possible but less efficient and scalable than using Cloud Logging, especially when pods are restarting rapidly. Serial Port logs are for virtual machine boot processes and low-level system messages, not application logs from within containers.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed