gcluster job logs

NAME

gcluster job logs - fetches logs for a job in the cluster.

SYNOPSIS

gcluster job logs JOB_NAME [FLAGS]

DESCRIPTION

The gcluster job logs command fetches logs for a workload (job) running in the cluster.

POSITIONAL ARGUMENTS

JOB_NAME
The name of the job to fetch logs for.

FLAGS

  • -f, --follow: Streams logs continuously.
  • --main-only: Fetches logs only for the main replicated job.

PERSISTENT FLAGS

These flags are available to all gcluster job commands:

  • -c, --cluster CLUSTER_NAME: The name of the GKE cluster.
  • -l, --location LOCATION: The location, either a region or a zone, of the GKE cluster.
  • -p, --project PROJECT_ID: The Google Cloud project ID.
  • --gke-namespace NAMESPACE: The target GKE namespace for the operation.
  • --skip-prereqs: Skips local environment prerequisite checks, such as gcloud, kubectl, and docker authentication.

EXAMPLES

To fetch logs for a job named train-job:

gcluster job logs train-job \
    --cluster=my-cluster \
    --location=us-central1-a

To continuously stream logs for a job:

gcluster job logs train-job \
    --cluster=my-cluster \
    --location=us-central1-a \
    --follow