View logs

This topic explains how to view log data by using the Logs Explorer in the Google Cloud console or by using the kubectl logs command.

View logs in the Logs Explorer

This section explains how to view Apigee hybrid logs in the Logs Explorer or directly by using kubectl.

If you are on GKE or Anthos GKE, logs are automatically sent to Cloud Logging.

To view logs in the Logs Explorer:

  1. In the Google Cloud console, go to the Logs Explorer page.

    Go to the Logs Explorer

  2. In the Resource type drop-down list, select Kubernetes Container, the name of your cluster, and your namespace ID.

    For more information, see View logs in the Google Cloud console documentation.

The following example shows hybrid log output in the Logs Explorer:

View log files directly

You can view the logs that are written to each pod's filesystem directly using kubectl, as follows:

kubectl logs pod_name -n namespace

For example:

kubectl logs apigee-mp-hybrid-docs-test-blue-6fb96f5b9-2k8hp -n my-namespace