QuestionQ9

Ensuring solution and operations excellence

You run a cluster on Kubernetes Engine (GKE) that serves a web application. Users report that a particular part of the application no longer responds. You observe that every pod in your deployment restarts after 2 seconds. The application writes logs to standard output. You need to inspect the logs to determine the cause of the issue. Which approach can you use?

  • 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.
Explanation

GKE automatically collects workload logs written to standard output and standard error and makes them available in Cloud Logging as k8s_container logs. Reviewing the logs for the specific application container is therefore the appropriate way to diagnose an application component whose pods are repeatedly restarting.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!