gcluster job inspect

NAME

gcluster job inspect - inspects cluster health and workload status.

SYNOPSIS

gcluster job inspect [FLAGS]

DESCRIPTION

The gcluster job inspect command inspects cluster health and workload status on Google Kubernetes Engine (GKE) and Kubernetes clusters. The report includes both JobSet and standalone batch/v1 Job workloads. When Kueue or JobSet APIs aren't available on the cluster or are disabled with the GCLUSTER_DISABLE_KUEUE=1 or GCLUSTER_DISABLE_JOBSET=1 environment variables, the gcluster CLI skips the corresponding report sections.

FLAGS

  • -n, --name NAME: The name of the specific workload to inspect.
  • --filter COMPONENT: Filters the inspection output to a specific component. The supported value is pathways-sps, which collects a summary of a Shared Pathways Service (SPS) instance and requires the --name flag.
  • -o, --output PATH: A custom path or filename to write logs to. If you omit this flag, then the gcluster CLI writes the gcluster-inspect-CLUSTER-TIMESTAMP.log file to the current working directory, falling back to the ~/.gcluster/logs/ directory or the system temporary directory if the current directory isn't writable.
  • -s, --show: Prints output to the terminal in addition to the file.

PERSISTENT FLAGS

These flags are available to all gcluster job commands:

  • -c, --cluster CLUSTER_NAME: The name of the GKE cluster or Kubernetes kubeconfig context. Optional in Kubernetes mode when the current-context field is set.
  • -l, --location LOCATION: The location, either a region or a zone, of the GKE cluster (GKE only).
  • -p, --project PROJECT_ID: The Google Cloud project ID (GKE only).
  • --gke-namespace NAMESPACE: The target Kubernetes namespace for the operation. If you omit this flag, then the gcluster CLI detects the namespace automatically.
  • --skip-prereqs: Skips local environment prerequisite checks, such as kubectl and gcloud checks, and container registry authentication for Crane builds.

EXAMPLES

To inspect overall cluster health:

gcluster job inspect \
    --project=my-project \
    --cluster=my-cluster \
    --location=us-central1-a

To inspect a specific workload named train-job and show output in the terminal:

gcluster job inspect \
    --project=my-project \
    --cluster=my-cluster \
    --location=us-central1-a \
    --name=train-job \
    --show