View Ray Operator logs on GKE


This page shows you how to read Ray Operator logs on Google Kubernetes Engine (GKE) using Cloud Logging when you use the Ray Operator on GKE.

Before you begin

Before you start, make sure that you have performed the following tasks:

  • Enable the Google Kubernetes Engine API.
  • Enable Google Kubernetes Engine API
  • If you want to use the Google Cloud CLI for this task, install and then initialize the gcloud CLI. If you previously installed the gcloud CLI, get the latest version by running gcloud components update.

Requirements and limitations

Ray Operator logs are available on GKE cluster versions 1.33.1-gke.1231000 or later.

View Ray operator logs

When enabling the Ray Operator on GKE, the operator logs are automatically available in Cloud Logging.

To view the logs, follow these steps:

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

    Open the Logs Explorer

  2. Open the query editor. In the query editor, enter your expression and click Run query.

    You can use the following example query in the Logs Explorer:

       resource.type="k8s_control_plane_component"
       resource.labels.cluster_name="CLUSTER_NAME"
       resource.labels.___location="CLUSTER_LOCATION"
       logName="projects/"PROJECT_NAME"/logs/container.googleapis.com%2Fray-operator"
    

    Replace the following values:

    • CLUSTER_NAME: the name of your GKE cluster.
    • CLUSTER_LOCATION: the Compute Engine ___location of the control plane of your cluster. Provide a region for regional clusters, or a zone for zonal clusters.
    • PROJECT_NAME: your Google Cloud project ID.

    The query returns logs related to the Ray Operator addon, such as the status of the Ray cluster, the creation of the Ray resources, and the reconciliation of the Ray resources.