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 the gcluster or ./gcluster command:
gcluster: The shell searches for thegclusterbinary in the directories that are listed in your system'sPATHenvironment variable, such as/usr/local/binor/usr/bin../gcluster: The./prefix instructs the shell to ignore thePATHenvironment variable and run thegclusterbinary that is located in your current working directory.
GLOBAL FLAGS
These flags are available to all commands:
--download-dependencies: Automatically downloads missing dependencies, such as Terraform and Packer. To make your deployment fail when dependencies are missing, pass the--download-dependencies=falseflag.--no-color: Turns off colorized output.-h,--help: Displays help information for any command.-v,--version: Displays the version of thegclusterCLI.
GROUPS
GROUP is one of the following:
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.
explain- Discovers and inspects blueprints, embedded modules, and cluster specifications offline.
export-outputs- Exports outputs from a deployment group to other dependent groups.
import-inputs- Imports input values from previous deployment groups.
telemetry- Turns telemetry data collection on or off.
completion- Generates and loads a command completion script for Bash, Zsh, Fish, or PowerShell.
EXAMPLES
To inspect a blueprint's customizable variables, deployment groups and modules, and required APIs before creating a deployment:
gcluster explain blueprint.yaml
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 \
--project=my-project \
--cluster=my-cluster \
--location=us-central1-a \
--name=train-job \
--compute-type=n2-standard-32 \
--image=us-docker.pkg.dev/my-project/my-repo/training:v1 \
--command="python3 train.py"
To destroy all resources created for a deployment:
gcluster destroy ./my-deployment --auto-approve