gcluster

NAME

gcluster - provides the command-line interface for Cluster Toolkit.

SYNOPSIS

gcluster [GROUP] | COMMAND [FLAGS]

DESCRIPTION

The gcluster CLI is the command-line tool for creating, deploying, and managing clusters and workloads with Cluster Toolkit.

Depending on how you set up your environment, you can run commands by using either gcluster or ./gcluster:

  • gcluster: The shell searches for the gcluster binary in the directories that are listed in your system's PATH environment variable, such as /usr/local/bin or /usr/bin.
  • ./gcluster: The ./ prefix instructs the shell to ignore the PATH environment variable and run the gcluster binary that is located in your current working directory.

GLOBAL FLAGS

These flags are available to all commands:

  • --download-dependencies: Automatically downloads missing dependencies. Use --download-dependencies=false to make your deployment fail if dependencies are missing.
  • --no-color: Turns off colorized output.
  • --help: Displays help information for any command.

GROUPS

GROUP is one of the following:

job
Manages jobs on the cluster.
cluster
Manages clusters and environments.

COMMANDS

COMMAND is one of the following:

create
Creates a new deployment based on a provided blueprint.
deploy
Deploys all resources in a toolkit deployment directory.
destroy
Destroys all resources in a toolkit deployment directory.
expand
Expands the blueprint without creating a new deployment.
export-outputs
Exports outputs from a deployment group to other dependent groups.
import-inputs
Imports input values from previous deployment groups.
telemetry
Enables or disables telemetry data collection.
completion
Generates and loads a command completion script for Bash, Zsh, Fish, or PowerShell.

EXAMPLES

To create a deployment directory from a blueprint:

gcluster create blueprint.yaml -o ./my-deployment

To deploy all resources defined in a deployment directory:

gcluster deploy ./my-deployment --auto-approve

To list available clusters:

gcluster cluster list

To submit a workload to a cluster:

gcluster job submit \
    --cluster=my-cluster \
    --location=us-central1-a \
    --name=train-job \
    --image=gcr.io/my-project/training:v1 \
    --command="python3 train.py"

To destroy all resources created for a deployment:

gcluster destroy ./my-deployment --auto-approve