gcluster job list

NAME

gcluster job list - lists workloads in the cluster.

SYNOPSIS

gcluster job list [FLAGS]

DESCRIPTION

The gcluster job list command lists JobSet and standalone batch/v1 Job workloads running or scheduled in a Google Kubernetes Engine (GKE) or Kubernetes cluster.

FLAGS

  • --status STATUS: Filters jobs by status, such as Pending, Running, Succeeded, Failed, or Suspended. For JobSet workloads, the gcluster job list command derives the status from the JobSet resource: Suspended while queued in Kueue, Running after admission, Succeeded, or Failed. Standalone batch/v1 Indexed Job workloads can also report Pending before Pods become active.
  • --name-contains STRING: Filters jobs by name containing the specified string.

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 list all jobs in a cluster:

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

To list only jobs with status Running:

gcluster job list \
    --project=my-project \
    --cluster=my-cluster \
    --location=us-central1-a \
    --status=Running