- NAME
-
- gcloud alpha cluster-director clusters create - creates a Cluster Director resource
- SYNOPSIS
-
-
gcloud alpha cluster-director clusters create(CLUSTER:--location=LOCATION) (--config=[computeResources=COMPUTERESOURCES],[description=DESCRIPTION],[labels=LABELS],[name=NAME],[networkResources=NETWORKRESOURCES],[orchestrator=ORCHESTRATOR],[storageResources=STORAGERESOURCES] | [--slurm-login-node=[bootDisk=BOOTDISK],[count=COUNT],[enableOSLogin=ENABLEOSLOGIN],[enablePublicIPs=ENABLEPUBLICIPS],[labels=LABELS],[machineType=MACHINETYPE],[serviceAccount=SERVICEACCOUNT],[startupScript=STARTUPSCRIPT],[zone=ZONE] (--create-network=[description=DESCRIPTION],[name=NAME] | [--network=NETWORK--subnet=SUBNET:--network-project=NETWORK_PROJECT]) :--buckets=[BUCKETS,…]--create-buckets=[autoclassTerminalStorageClass=AUTOCLASSTERMINALSTORAGECLASS],[enableAutoclass=ENABLEAUTOCLASS],[enableHNS=ENABLEHNS],[name=NAME],[storageClass=STORAGECLASS]--create-filestores=[capacityGb=CAPACITYGB],[description=DESCRIPTION],[fileshare=FILESHARE],[name=NAME],[protocol=PROTOCOL],[tier=TIER]--create-lustres=[capacityGb=CAPACITYGB],[description=DESCRIPTION],[filesystem=FILESYSTEM],[name=NAME],[perUnitStorageThroughput=PERUNITSTORAGETHROUGHPUT]--description=DESCRIPTION--filestores=[FILESTORES,…]--flex-start-instances=[atmTags=ATMTAGS],[id=ID],[machineType=MACHINETYPE],[maxDuration=MAXDURATION],[zone=ZONE]--labels=[LABELS,…]--lustres=[LUSTRES,…]--on-demand-instances=[atmTags=ATMTAGS],[id=ID],[machineType=MACHINETYPE],[zone=ZONE]--reserved-instances=[atmTags=ATMTAGS],[id=ID],[reservation=RESERVATION],[reservationBlock=RESERVATIONBLOCK],[reservationSubBlock=RESERVATIONSUBBLOCK]--slurm-config=[accountingStorageEnforceFlags=ACCOUNTINGSTORAGEENFORCEFLAGS],[healthCheckInterval=HEALTHCHECKINTERVAL],[healthCheckNodeState=HEALTHCHECKNODESTATE],[healthCheckProgram=HEALTHCHECKPROGRAM],[preemptExemptTime=PREEMPTEXEMPTTIME],[preemptMode=PREEMPTMODE],[preemptType=PREEMPTTYPE],[priorityType=PRIORITYTYPE],[priorityWeightAge=PRIORITYWEIGHTAGE],[priorityWeightAssoc=PRIORITYWEIGHTASSOC],[priorityWeightFairshare=PRIORITYWEIGHTFAIRSHARE],[priorityWeightJobSize=PRIORITYWEIGHTJOBSIZE],[priorityWeightPartition=PRIORITYWEIGHTPARTITION],[priorityWeightQos=PRIORITYWEIGHTQOS],[priorityWeightTres=PRIORITYWEIGHTTRES],[prologEpilogTimeout=PROLOGEPILOGTIMEOUT],[prologFlags=PROLOGFLAGS],[requeueExitCodes=REQUEUEEXITCODES],[requeueHoldExitCodes=REQUEUEHOLDEXITCODES]--slurm-default-partition=SLURM_DEFAULT_PARTITION--slurm-disable-health-check-program--slurm-epilog-scripts=[SLURM_EPILOG_SCRIPTS,…]--slurm-node-sets=[bootDisk=BOOTDISK],[computeId=COMPUTEID],[container-resource-labels=CONTAINER-RESOURCE-LABELS],[container-startup-script=CONTAINER-STARTUP-SCRIPT],[id=ID],[labels=LABELS],[maxDynamicNodeCount=MAXDYNAMICNODECOUNT],[serviceAccount=SERVICEACCOUNT],[startupScript=STARTUPSCRIPT],[startupScriptTimeout=STARTUPSCRIPTTIMEOUT],[staticNodeCount=STATICNODECOUNT]--slurm-partitions=[exclusive=EXCLUSIVE],[id=ID],[nodesetIds=NODESETIDS]--slurm-prolog-scripts=[SLURM_PROLOG_SCRIPTS,…]--slurm-task-epilog-scripts=[SLURM_TASK_EPILOG_SCRIPTS,…]--slurm-task-prolog-scripts=[SLURM_TASK_PROLOG_SCRIPTS,…]--spot-instances=[atmTags=ATMTAGS],[id=ID],[machineType=MACHINETYPE],[terminationAction=TERMINATIONACTION],[zone=ZONE]]) [--async] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
-
(ALPHA)gcloud alpha cluster-director clusters createfacilitates the creation of a cluster resource.There are following ways to create a cluster:
- [Preferred] Use granular flags to define cluster specs.
- Use --config flag with cluster specs in JSON format.
Please refer to the examples below for more details.
- EXAMPLES
-
To create a cluster
my-clusterin locationus-central1with granular flags, run the following example:gcloud alpha cluster-director clusters create my-cluster --location us-central1 --description "My cluster description" --labels env=prod,client=gcloud-cli --create-network name=network0 --create-filestores name=locations/us-central1-a/instances/filestore0,tier=ZONAL,capacityGb={filestoreSize},fileshare={fileshare} --filestores locations/us-central1-a/instances/filestore1 --create-buckets name=bucket0 --buckets bucket1 --create-lustres name=locations/us-central1-a/instances/lustre0,capacityGb={lustreSize},filesystem={filesystem} --lustres locations/us-central1-a/instances/lustre1 --reserved-instances id=compute0,machineType={machineType},reservation=zones/us-central1-a/reservations/{reservation} --slurm-login-node machineType={machineType},zone=us-central1-a --slurm-node-sets id=nodeset0,computeId=compute0 --slurm-partitions id=partition0,nodesetIds=[nodeset0] --slurm-default-partition partition0 --format jsonTo create a cluster
my-clusterin locationus-central1with config in JSON string format run the following example:gcloud alpha cluster-director clusters create my-cluster --location=us-central1 --config='{"key": "value"}'Or create a JSON file
my-cluster-config.jsonwith the cluster specs and run the following file example:gcloud alpha cluster-director clusters create my-cluster --location=us-central1 --config=my-cluster-config.json - POSITIONAL ARGUMENTS
-
-
Cluster resource - Name of the cluster resource. Formats: cluster |
projects/{project}/locations/{locations}/clusters/{cluster} The arguments in
this group can be used to specify the attributes of this resource. (NOTE) Some
attributes are not given arguments in this group but can be set in other ways.
To set the
projectattribute:-
provide the argument
clusteron the command line with a fully specified name; -
provide the argument
--projecton the command line; -
set the property
core/project.
This must be specified.
CLUSTER-
ID of the cluster or fully qualified identifier for the cluster.
To set the
clusterattribute:-
provide the argument
clusteron the command line.
This positional argument must be specified if any of the other arguments in this group are specified.
-
provide the argument
--location=LOCATION-
The location id of the cluster resource.
To set the
locationattribute:-
provide the argument
clusteron the command line with a fully specified name; -
provide the argument
--locationon the command line.
-
provide the argument
-
provide the argument
-
Cluster resource - Name of the cluster resource. Formats: cluster |
projects/{project}/locations/{locations}/clusters/{cluster} The arguments in
this group can be used to specify the attributes of this resource. (NOTE) Some
attributes are not given arguments in this group but can be set in other ways.
- REQUIRED FLAGS
-
-
Cluster configuration for provisioning.
Exactly one of these must be specified:
--config=[computeResources=COMPUTERESOURCES],[description=DESCRIPTION],[labels=LABELS],[name=NAME],[networkResources=NETWORKRESOURCES],[orchestrator=ORCHESTRATOR],[storageResources=STORAGERESOURCES]-
Configuration of the cluster specs in the form of a JSON object. Sets
configvalue.computeResources-
Sets
computeResourcesvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.config-
Sets
configvalue.newDwsFlexInstances-
Sets
newDwsFlexInstancesvalue.atmTags-
Sets
atmTagsvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.
machineType-
Sets
machineTypevalue. maxDuration-
Sets
maxDurationvalue. terminationAction-
Sets
terminationActionvalue. zone-
Sets
zonevalue.
newFlexStartInstances-
Sets
newFlexStartInstancesvalue.atmTags-
Sets
atmTagsvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.
machineType-
Sets
machineTypevalue. maxDuration-
Sets
maxDurationvalue. terminationAction-
Sets
terminationActionvalue. zone-
Sets
zonevalue.
newOnDemandInstances-
Sets
newOnDemandInstancesvalue.atmTags-
Sets
atmTagsvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.
machineType-
Sets
machineTypevalue. zone-
Sets
zonevalue.
newReservedInstances-
Sets
newReservedInstancesvalue.atmTags-
Sets
atmTagsvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.
machineType-
Sets
machineTypevalue. reservation-
Sets
reservationvalue. reservationBlock-
Sets
reservationBlockvalue. reservationSubBlock-
Sets
reservationSubBlockvalue. type-
Sets
typevalue. zone-
Sets
zonevalue.
newSpotInstances-
Sets
newSpotInstancesvalue.atmTags-
Sets
atmTagsvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.
machineType-
Sets
machineTypevalue. terminationAction-
Sets
terminationActionvalue. zone-
Sets
zonevalue.
description-
Sets
descriptionvalue. labels-
Sets
labelsvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.
name-
Sets
namevalue. networkResources-
Sets
networkResourcesvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.config-
Sets
configvalue.existingComputeNetwork-
Sets
existingComputeNetworkvalue.network-
Sets
networkvalue. subnetwork-
Sets
subnetworkvalue.
existingNetwork-
Sets
existingNetworkvalue.network-
Sets
networkvalue. subnetwork-
Sets
subnetworkvalue.
newComputeNetwork-
Sets
newComputeNetworkvalue.description-
Sets
descriptionvalue. network-
Sets
networkvalue.
newNetwork-
Sets
newNetworkvalue.description-
Sets
descriptionvalue. network-
Sets
networkvalue.
orchestrator-
Sets
orchestratorvalue.slurm-
Sets
slurmvalue.config-
Sets
configvalue.accountingStorageEnforceFlags-
Sets
accountingStorageEnforceFlagsvalue. healthCheckInterval-
Sets
healthCheckIntervalvalue. healthCheckNodeState-
Sets
healthCheckNodeStatevalue. healthCheckProgram-
Sets
healthCheckProgramvalue. preemptExemptTime-
Sets
preemptExemptTimevalue. preemptMode-
Sets
preemptModevalue. preemptType-
Sets
preemptTypevalue. priorityType-
Sets
priorityTypevalue. priorityWeightAge-
Sets
priorityWeightAgevalue. priorityWeightAssoc-
Sets
priorityWeightAssocvalue. -
Sets
priorityWeightFairsharevalue. priorityWeightJobSize-
Sets
priorityWeightJobSizevalue. priorityWeightPartition-
Sets
priorityWeightPartitionvalue. priorityWeightQos-
Sets
priorityWeightQosvalue. priorityWeightTres-
Sets
priorityWeightTresvalue. prologEpilogTimeout-
Sets
prologEpilogTimeoutvalue. prologFlags-
Sets
prologFlagsvalue. requeueExitCodes-
Sets
requeueExitCodesvalue. requeueHoldExitCodes-
Sets
requeueHoldExitCodesvalue.
defaultPartition-
Sets
defaultPartitionvalue. disableHealthCheckProgram-
Sets
disableHealthCheckProgramvalue. epilogBashScripts-
Sets
epilogBashScriptsvalue. loginNodes-
Sets
loginNodesvalue.bootDisk-
Sets
bootDiskvalue.image-
Sets
imagevalue. sizeGb-
Required, sets
sizeGbvalue. type-
Required, sets
typevalue.
count-
Sets
countvalue. enableOsLogin-
Sets
enableOsLoginvalue. enablePublicIps-
Sets
enablePublicIpsvalue. labels-
Sets
labelsvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.
machineType-
Sets
machineTypevalue. serviceAccount-
Sets
serviceAccountvalue.email-
Sets
emailvalue. scopes-
Sets
scopesvalue.
startupScript-
Sets
startupScriptvalue. storageConfigs-
Sets
storageConfigsvalue.id-
Sets
idvalue. localMount-
Sets
localMountvalue.
zone-
Sets
zonevalue.
nodeSets-
Sets
nodeSetsvalue.computeId-
Sets
computeIdvalue. computeInstance-
Sets
computeInstancevalue.bootDisk-
Sets
bootDiskvalue.image-
Sets
imagevalue. sizeGb-
Required, sets
sizeGbvalue. type-
Required, sets
typevalue.
labels-
Sets
labelsvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.
startupScript-
Sets
startupScriptvalue.
containerNodePool-
Sets
containerNodePoolvalue. id-
Sets
idvalue. maxDynamicNodeCount-
Sets
maxDynamicNodeCountvalue. serviceAccount-
Sets
serviceAccountvalue.email-
Sets
emailvalue. scopes-
Sets
scopesvalue.
staticNodeCount-
Sets
staticNodeCountvalue. storageConfigs-
Sets
storageConfigsvalue.id-
Sets
idvalue. localMount-
Sets
localMountvalue.
partitions-
Sets
partitionsvalue.exclusive-
Sets
exclusivevalue. id-
Sets
idvalue. nodeSetIds-
Sets
nodeSetIdsvalue.
prologBashScripts-
Sets
prologBashScriptsvalue. taskEpilogBashScripts-
Sets
taskEpilogBashScriptsvalue. taskPrologBashScripts-
Sets
taskPrologBashScriptsvalue.
storageResources-
Sets
storageResourcesvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.config-
Sets
configvalue.existingBucket-
Sets
existingBucketvalue.bucket-
Sets
bucketvalue.
existingFilestore-
Sets
existingFilestorevalue.filestore-
Sets
filestorevalue.
existingLustre-
Sets
existingLustrevalue.lustre-
Sets
lustrevalue.
newBucket-
Sets
newBucketvalue.autoclass-
Sets
autoclassvalue.enabled-
Sets
enabledvalue. terminalStorageClass-
Sets
terminalStorageClassvalue.
bucket-
Sets
bucketvalue. hierarchicalNamespace-
Sets
hierarchicalNamespacevalue.enabled-
Sets
enabledvalue.
storageClass-
Sets
storageClassvalue.
newFilestore-
Sets
newFilestorevalue.description-
Sets
descriptionvalue. -
Sets
fileSharesvalue.capacityGb-
Sets
capacityGbvalue. -
Sets
fileSharevalue.
filestore-
Sets
filestorevalue. protocol-
Sets
protocolvalue. tier-
Sets
tiervalue.
newLustre-
Sets
newLustrevalue.capacityGb-
Sets
capacityGbvalue. description-
Sets
descriptionvalue. filesystem-
Sets
filesystemvalue. lustre-
Sets
lustrevalue. perUnitStorageThroughput-
Sets
perUnitStorageThroughputvalue.
Shorthand Example:--config=computeResources={string={config={newDwsFlexInstances={atmTags={string=string},machineType=string,maxDuration=string,terminationAction=string,zone=string},newFlexStartInstances={atmTags={string=string},machineType=string,maxDuration=string,terminationAction=string,zone=string},newOnDemandInstances={atmTags={string=string},machineType=string,zone=string},newReservedInstances={atmTags={string=string},machineType=string,reservation=string,reservationBlock=string,reservationSubBlock=string,type=string,zone=string},newSpotInstances={atmTags={string=string},machineType=string,terminationAction=string,zone=string}}}},description=string,labels={string=string},name=string,networkResources={string={config={existingComputeNetwork={network=string,subnetwork=string},existingNetwork={network=string,subnetwork=string},newComputeNetwork={description=string,network=string},newNetwork={description=string,network=string}}}},orchestrator={slurm={config={accountingStorageEnforceFlags,healthCheckInterval=int,healthCheckNodeState=string,healthCheckProgram=string,preemptExemptTime=string,preemptMode,preemptType=string,priorityType=string,priorityWeightAge=int,priorityWeightAssoc=int,priorityWeightFairshare=int,priorityWeightJobSize=int,priorityWeightPartition=int,priorityWeightQos=int,priorityWeightTres=string,prologEpilogTimeout=string,prologFlags,requeueExitCodes,requeueHoldExitCodes},defaultPartition=string,disableHealthCheckProgram=boolean,epilogBashScripts,loginNodes={bootDisk={image=string,sizeGb=int,type=string},count=int,enableOsLogin=boolean,enablePublicIps=boolean,labels={string=string},machineType=string,serviceAccount={email=string,scopes},startupScript=string,storageConfigs=[{id=string,localMount=string}],zone=string},nodeSets=[{computeId=string,computeInstance={bootDisk={image=string,sizeGb=int,type=string},labels={string=string},startupScript=string},containerNodePool,id=string,maxDynamicNodeCount=int,serviceAccount={email=string,scopes},staticNodeCount=int,storageConfigs=[{id=string,localMount=string}]}],partitions=[{exclusive=boolean,id=string,nodeSetIds=[string]}],prologBashScripts,taskEpilogBashScripts,taskPrologBashScripts}},storageResources={string={config={existingBucket={bucket=string},existingFilestore={filestore=string},existingLustre={lustre=string},newBucket={autoclass={enabled=boolean,terminalStorageClass=string},bucket=string,hierarchicalNamespace={enabled=boolean},storageClass=string},newFilestore={description=string,fileShares=[{capacityGb=int,fileShare=string}],filestore=string,protocol=string,tier=string},newLustre={capacityGb=int,description=string,filesystem=string,lustre=string,perUnitStorageThroughput=int}}}}
JSON Example:--config='{"computeResources": {"string": {"config": {"newDwsFlexInstances": {"atmTags": {"string": "string"}, "machineType": "string", "maxDuration": "string", "terminationAction": "string", "zone": "string"}, "newFlexStartInstances": {"atmTags": {"string": "string"}, "machineType": "string", "maxDuration": "string", "terminationAction": "string", "zone": "string"}, "newOnDemandInstances": {"atmTags": {"string": "string"}, "machineType": "string", "zone": "string"}, "newReservedInstances": {"atmTags": {"string": "string"}, "machineType": "string", "reservation": "string", "reservationBlock": "string", "reservationSubBlock": "string", "type": "string", "zone": "string"}, "newSpotInstances": {"atmTags": {"string": "string"}, "machineType": "string", "terminationAction": "string", "zone": "string"}}}}, "description": "string", "labels": {"string": "string"}, "name": "string", "networkResources": {"string": {"config": {"existingComputeNetwork": {"network": "string", "subnetwork": "string"}, "existingNetwork": {"network": "string", "subnetwork": "string"}, "newComputeNetwork": {"description": "string", "network": "string"}, "newNetwork": {"description": "string", "network": "string"}}}}, "orchestrator": {"slurm": {"config": {"accountingStorageEnforceFlags", "healthCheckInterval": int, "healthCheckNodeState": "string", "healthCheckProgram": "string", "preemptExemptTime": "string", "preemptMode", "preemptType": "string", "priorityType": "string", "priorityWeightAge": int, "priorityWeightAssoc": int, "priorityWeightFairshare": int, "priorityWeightJobSize": int, "priorityWeightPartition": int, "priorityWeightQos": int, "priorityWeightTres": "string", "prologEpilogTimeout": "string", "prologFlags", "requeueExitCodes", "requeueHoldExitCodes"}, "defaultPartition": "string", "disableHealthCheckProgram": boolean, "epilogBashScripts", "loginNodes": {"bootDisk": {"image": "string", "sizeGb": int, "type": "string"}, "count": int, "enableOsLogin": boolean, "enablePublicIps": boolean, "labels": {"string": "string"}, "machineType": "string", "serviceAccount": {"email": "string", "scopes"}, "startupScript": "string", "storageConfigs": [{"id": "string", "localMount": "string"}], "zone": "string"}, "nodeSets": [{"computeId": "string", "computeInstance": {"bootDisk": {"image": "string", "sizeGb": int, "type": "string"}, "labels": {"string": "string"}, "startupScript": "string"}, "containerNodePool": {}, "id": "string", "maxDynamicNodeCount": int, "serviceAccount": {"email": "string", "scopes"}, "staticNodeCount": int, "storageConfigs": [{"id": "string", "localMount": "string"}]}], "partitions": [{"exclusive": boolean, "id": "string", "nodeSetIds": ["string"]}], "prologBashScripts", "taskEpilogBashScripts", "taskPrologBashScripts"}}, "storageResources": {"string": {"config": {"existingBucket": {"bucket": "string"}, "existingFilestore": {"filestore": "string"}, "existingLustre": {"lustre": "string"}, "newBucket": {"autoclass": {"enabled": boolean, "terminalStorageClass": "string"}, "bucket": "string", "hierarchicalNamespace": {"enabled": boolean}, "storageClass": "string"}, "newFilestore": {"description": "string", "fileShares": [{"capacityGb": int, "fileShare": "string"}], "filestore": "string", "protocol": "string", "tier": "string"}, "newLustre": {"capacityGb": int, "description": "string", "filesystem": "string", "lustre": "string", "perUnitStorageThroughput": int}}}}}'
File Example:--config=path_to_file.(yaml|json)
-
Or at least one of these can be specified:
- Flag Configurations to define cluster spec.
--slurm-login-node=[bootDisk=BOOTDISK],[count=COUNT],[enableOSLogin=ENABLEOSLOGIN],[enablePublicIPs=ENABLEPUBLICIPS],[labels=LABELS],[machineType=MACHINETYPE],[serviceAccount=SERVICEACCOUNT],[startupScript=STARTUPSCRIPT],[zone=ZONE]-
Parameters to define slurm cluster login node.
For e.g. --slurm-login-node machineType={machineType},zone={zone},count={count},enableOSLogin=true,enablePublicIPs=true,startupScript="echo hello",labels="{key1=value1,key2=value2}",bootDisk={type=pd-standard,sizeGb=100}
If bootDisk is specified, sizeGb must be greater than 50.
Defaults:
- count: 1
- enableOSLogin: true
- enablePublicIPs: true
- bootDisk.sizeGb: 100
Note:
-
startupScript:
- Either str or file_path
- For file_path, only bash file format (.sh or .bash) is supported.
- For file_path, only absolute path is supported.
Required, sets
slurm_login_nodevalue.
bootDisk-
Sets
bootDiskvalue.image-
Sets
imagevalue. sizeGb-
Required, sets
sizeGbvalue. type-
Required, sets
typevalue.
count-
Sets
countvalue. enableOSLogin-
Sets
enableOSLoginvalue. enablePublicIPs-
Sets
enablePublicIPsvalue. labels-
Sets
labelsvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.
machineType-
Required, sets
machineTypevalue. serviceAccount-
Sets
serviceAccountvalue.email-
Sets
emailvalue. scopes-
Sets
scopesvalue.
startupScript-
Sets
startupScriptvalue. zone-
Required, sets
zonevalue.
Shorthand Example:--slurm-login-node=bootDisk={image=string,sizeGb=int,type=string},count=int,enableOSLogin=boolean,enablePublicIPs=boolean,labels={string=string},machineType=string,serviceAccount={email=string,scopes},startupScript=string,zone=string
JSON Example:--slurm-login-node='{"bootDisk": {"image": "string", "sizeGb": int, "type": "string"}, "count": int, "enableOSLogin": boolean, "enablePublicIPs": boolean, "labels": {"string": "string"}, "machineType": "string", "serviceAccount": {"email": "string", "scopes"}, "startupScript": "string", "zone": "string"}'
File Example:--slurm-login-node=path_to_file.(yaml|json)
This flag argument must be specified if any of the other arguments in this group are specified.
--buckets=[BUCKETS,…]-
Reference of existing Google Cloud Storage bucket.
For e.g. --buckets {existing-bucket-name eg. my-bucket}
--create-buckets=[autoclassTerminalStorageClass=AUTOCLASSTERMINALSTORAGECLASS],[enableAutoclass=ENABLEAUTOCLASS],[enableHNS=ENABLEHNS],[name=NAME],[storageClass=STORAGECLASS]-
Parameters to create a Google Cloud Storage bucket.
For e.g. --create-buckets name={bucket-path},storageClass=STANDARD,autoclassTerminalStorageClass=TERMINAL_STORAGE_CLASS_NEARLINE,enableHNS=true
Supported storageClass values:
- STANDARD
- NEARLINE
- COLDLINE
- ARCHIVE
Supported autoclassTerminalStorageClass values:
- TERMINAL_STORAGE_CLASS_NEARLINE
- TERMINAL_STORAGE_CLASS_ARCHIVE
Defaults:
- storageClass: STANDARD
Note:
- Either storageClass or enableAutoclass can be set.
- HNS: Hierarchical namespace.
Sets
create_bucketsvalue.autoclassTerminalStorageClass-
Sets
autoclassTerminalStorageClassvalue. enableAutoclass-
Sets
enableAutoclassvalue. enableHNS-
Sets
enableHNSvalue. name-
Required, sets
namevalue. storageClass-
Sets
storageClassvalue.
Shorthand Example:--create-buckets=autoclassTerminalStorageClass=string,enableAutoclass=boolean,enableHNS=boolean,name=string,storageClass=string --create-buckets=autoclassTerminalStorageClass=string,enableAutoclass=boolean,enableHNS=boolean,name=string,storageClass=string
JSON Example:--create-buckets='[{"autoclassTerminalStorageClass": "string", "enableAutoclass": boolean, "enableHNS": boolean, "name": "string", "storageClass": "string"}]'
File Example:--create-buckets=path_to_file.(yaml|json)
--create-filestores=[capacityGb=CAPACITYGB],[description=DESCRIPTION],[fileshare=FILESHARE],[name=NAME],[protocol=PROTOCOL],[tier=TIER]-
Parameters to create a filestore instance.
For e.g. --create-filestores name=locations/{location}/instances/{filestore},tier=REGIONAL,capacityGb={filestoreSize},fileshare={fileshare}
capacityGb: Size of the filestore in GB. Must be between 1024 and 102400, and must meet scalability requirements described at https://cloud.google.com/filestore/docs/service-tiers.
fileshare: The directory on a Filestore instance where all shared files are stored. Must match the regex
[a-z]([-a-z0-9]*[a-z0-9])?, be 1-63 characters in length, and comply with RFC1035. Supported tier values:- ZONAL
- REGIONAL
Supported protocol values:
- NFSV3
- NFSV41
- If not specified, defaults to NFSV3
Defaults:
- protocol: NFSV3.
Sets
create_filestoresvalue.capacityGb-
Required, sets
capacityGbvalue. description-
Sets
descriptionvalue. -
Required, sets
filesharevalue. name-
Required, sets
namevalue. protocol-
Sets
protocolvalue. tier-
Required, sets
tiervalue.
Shorthand Example:--create-filestores=capacityGb=int,description=string,fileshare=string,name=string,protocol=string,tier=string --create-filestores=capacityGb=int,description=string,fileshare=string,name=string,protocol=string,tier=string
JSON Example:--create-filestores='[{"capacityGb": int, "description": "string", "fileshare": "string", "name": "string", "protocol": "string", "tier": "string"}]'
File Example:--create-filestores=path_to_file.(yaml|json)
--create-lustres=[capacityGb=CAPACITYGB],[description=DESCRIPTION],[filesystem=FILESYSTEM],[name=NAME],[perUnitStorageThroughput=PERUNITSTORAGETHROUGHPUT]-
Parameters to create a Lustre instance.
For e.g. --create-lustres name=locations/{location}/instances/{lustre},capacityGb={lustreSize},filesystem={filesystem}.
Sets
create_lustresvalue.capacityGb-
Required, sets
capacityGbvalue. description-
Sets
descriptionvalue. filesystem-
Required, sets
filesystemvalue. name-
Required, sets
namevalue. perUnitStorageThroughput-
Sets
perUnitStorageThroughputvalue.
Shorthand Example:--create-lustres=capacityGb=int,description=string,filesystem=string,name=string,perUnitStorageThroughput=int --create-lustres=capacityGb=int,description=string,filesystem=string,name=string,perUnitStorageThroughput=int
JSON Example:--create-lustres='[{"capacityGb": int, "description": "string", "filesystem": "string", "name": "string", "perUnitStorageThroughput": int}]'
File Example:--create-lustres=path_to_file.(yaml|json)
--description=DESCRIPTION-
Description of the cluster.
For e.g. --description
(ALPHA)Creates a Cluster Director resource. --filestores=[FILESTORES,…]-
Reference of existing filestore instance.
For e.g. --filestores locations/{location}/instances/{filestore}
--flex-start-instances=[atmTags=ATMTAGS],[id=ID],[machineType=MACHINETYPE],[maxDuration=MAXDURATION],[zone=ZONE]-
Parameters to define cluster Flex Start instances.
For e.g. --flex-start-instances id={computeId},zone={zone},machineType={machineType},maxDuration=10000s.
Sets
flex_start_instancesvalue.atmTags-
Sets
atmTagsvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.
id-
Required, sets
idvalue. machineType-
Required, sets
machineTypevalue. maxDuration-
Required, sets
maxDurationvalue. zone-
Required, sets
zonevalue.
Shorthand Example:--flex-start-instances=atmTags={string=string},id=string,machineType=string,maxDuration=string,zone=string --flex-start-instances=atmTags={string=string},id=string,machineType=string,maxDuration=string,zone=string
JSON Example:--flex-start-instances='[{"atmTags": {"string": "string"}, "id": "string", "machineType": "string", "maxDuration": "string", "zone": "string"}]'
File Example:--flex-start-instances=path_to_file.(yaml|json)
--labels=[LABELS,…]-
Cluster labels as key value pairs.
For e.g. --labels key1=value1,key2=value2.
Sets
labelsvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.
Shorthand Example:--labels={string=string}
JSON Example:--labels='{"string": "string"}'
File Example:--labels=path_to_file.(yaml|json)
--lustres=[LUSTRES,…]-
Reference of existing Lustre instance.
For e.g. --lustres locations/{location}/instances/{lustre}
--on-demand-instances=[atmTags=ATMTAGS],[id=ID],[machineType=MACHINETYPE],[zone=ZONE]-
Parameters to define cluster on demand instances.
For e.g. --on-demand-instances id={computeId},zone={zone},machineType={machineType}.
Sets
on_demand_instancesvalue.atmTags-
Sets
atmTagsvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.
id-
Required, sets
idvalue. machineType-
Required, sets
machineTypevalue. zone-
Required, sets
zonevalue.
Shorthand Example:--on-demand-instances=atmTags={string=string},id=string,machineType=string,zone=string --on-demand-instances=atmTags={string=string},id=string,machineType=string,zone=string
JSON Example:--on-demand-instances='[{"atmTags": {"string": "string"}, "id": "string", "machineType": "string", "zone": "string"}]'
File Example:--on-demand-instances=path_to_file.(yaml|json)
--reserved-instances=[atmTags=ATMTAGS],[id=ID],[reservation=RESERVATION],[reservationBlock=RESERVATIONBLOCK],[reservationSubBlock=RESERVATIONSUBBLOCK]-
Parameters to define cluster reserved instances.
For e.g. --reserved-instances id={computeId},reservation=zones/{zone}/reservations/{reservation}.
Sets
reserved_instancesvalue.atmTags-
Sets
atmTagsvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.
id-
Required, sets
idvalue. reservation-
Required, sets
reservationvalue. reservationBlock-
Sets
reservationBlockvalue. reservationSubBlock-
Sets
reservationSubBlockvalue.
Shorthand Example:--reserved-instances=atmTags={string=string},id=string,reservation=string,reservationBlock=string,reservationSubBlock=string --reserved-instances=atmTags={string=string},id=string,reservation=string,reservationBlock=string,reservationSubBlock=string
JSON Example:--reserved-instances='[{"atmTags": {"string": "string"}, "id": "string", "reservation": "string", "reservationBlock": "string", "reservationSubBlock": "string"}]'
File Example:--reserved-instances=path_to_file.(yaml|json)
--slurm-config=[accountingStorageEnforceFlags=ACCOUNTINGSTORAGEENFORCEFLAGS],[healthCheckInterval=HEALTHCHECKINTERVAL],[healthCheckNodeState=HEALTHCHECKNODESTATE],[healthCheckProgram=HEALTHCHECKPROGRAM],[preemptExemptTime=PREEMPTEXEMPTTIME],[preemptMode=PREEMPTMODE],[preemptType=PREEMPTTYPE],[priorityType=PRIORITYTYPE],[priorityWeightAge=PRIORITYWEIGHTAGE],[priorityWeightAssoc=PRIORITYWEIGHTASSOC],[priorityWeightFairshare=PRIORITYWEIGHTFAIRSHARE],[priorityWeightJobSize=PRIORITYWEIGHTJOBSIZE],[priorityWeightPartition=PRIORITYWEIGHTPARTITION],[priorityWeightQos=PRIORITYWEIGHTQOS],[priorityWeightTres=PRIORITYWEIGHTTRES],[prologEpilogTimeout=PROLOGEPILOGTIMEOUT],[prologFlags=PROLOGFLAGS],[requeueExitCodes=REQUEUEEXITCODES],[requeueHoldExitCodes=REQUEUEHOLDEXITCODES]-
Parameters to define slurm cluster config.
For e.g. --slurm-config healthCheckInterval=10,healthCheckNodeState=IDLE,healthCheckProgram=/usr/bin/true.
Sets
slurm_configvalue.accountingStorageEnforceFlags-
Sets
accountingStorageEnforceFlagsvalue. healthCheckInterval-
Sets
healthCheckIntervalvalue. healthCheckNodeState-
Sets
healthCheckNodeStatevalue. healthCheckProgram-
Sets
healthCheckProgramvalue. preemptExemptTime-
Sets
preemptExemptTimevalue. preemptMode-
Sets
preemptModevalue. preemptType-
Sets
preemptTypevalue. priorityType-
Sets
priorityTypevalue. priorityWeightAge-
Sets
priorityWeightAgevalue. priorityWeightAssoc-
Sets
priorityWeightAssocvalue. -
Sets
priorityWeightFairsharevalue. priorityWeightJobSize-
Sets
priorityWeightJobSizevalue. priorityWeightPartition-
Sets
priorityWeightPartitionvalue. priorityWeightQos-
Sets
priorityWeightQosvalue. priorityWeightTres-
Sets
priorityWeightTresvalue. prologEpilogTimeout-
Sets
prologEpilogTimeoutvalue. prologFlags-
Sets
prologFlagsvalue. requeueExitCodes-
Sets
requeueExitCodesvalue. requeueHoldExitCodes-
Sets
requeueHoldExitCodesvalue.
Shorthand Example:--slurm-config={accountingStorageEnforceFlags,healthCheckInterval=int,healthCheckNodeState=string,healthCheckProgram=string,preemptExemptTime=string,preemptMode,preemptType=string,priorityType=string,priorityWeightAge=int,priorityWeightAssoc=int,priorityWeightFairshare=int,priorityWeightJobSize=int,priorityWeightPartition=int,priorityWeightQos=int,priorityWeightTres=string,prologEpilogTimeout=string,prologFlags,requeueExitCodes,requeueHoldExitCodes}
JSON Example:--slurm-config='{"accountingStorageEnforceFlags", "healthCheckInterval": int, "healthCheckNodeState": "string", "healthCheckProgram": "string", "preemptExemptTime": "string", "preemptMode", "preemptType": "string", "priorityType": "string", "priorityWeightAge": int, "priorityWeightAssoc": int, "priorityWeightFairshare": int, "priorityWeightJobSize": int, "priorityWeightPartition": int, "priorityWeightQos": int, "priorityWeightTres": "string", "prologEpilogTimeout": "string", "prologFlags", "requeueExitCodes", "requeueHoldExitCodes"}'
File Example:--slurm-config=path_to_file.(yaml|json)
--slurm-default-partition=SLURM_DEFAULT_PARTITION-
Parameters to define slurm cluster default partition.
For e.g. --slurm-default-partition {partitionId}
--slurm-disable-health-check-program-
If true, health checking is disabled, and health_check_interval,
health_check_node_state, and health_check_program should not be passed in.
For e.g. --slurm-disable-health-check-program
--slurm-epilog-scripts=[SLURM_EPILOG_SCRIPTS,…]-
Slurm epilog bash scripts.
For e.g. --slurm-epilog-scripts script1.sh,script2.sh
--slurm-node-sets=[bootDisk=BOOTDISK],[computeId=COMPUTEID],[container-resource-labels=CONTAINER-RESOURCE-LABELS],[container-startup-script=CONTAINER-STARTUP-SCRIPT],[id=ID],[labels=LABELS],[maxDynamicNodeCount=MAXDYNAMICNODECOUNT],[serviceAccount=SERVICEACCOUNT],[startupScript=STARTUPSCRIPT],[startupScriptTimeout=STARTUPSCRIPTTIMEOUT],[staticNodeCount=STATICNODECOUNT]-
Parameters to define slurm cluster nodeset config.
For e.g. --slurm-node-sets id={nodesetId},computeId={computeId},staticNodeCount={staticNodeCount},maxDynamicNodeCount={maxDynamicNodeCount},startupScript="echo hello",labels="{key1=value1,key2=value2}"
To configure a node set backed by GKE, use container-resource-labels or container-startup-script. For e.g. --slurm-node-sets id={nodesetId},container-resource-labels="key1=val1",container-startup-script="echo hello"
Defaults:
- staticNodeCount: 1
Note:
-
startupScript:
- Either str or file_path
- For file_path, only bash file format (.sh or .bash) is supported.
- For file_path, only absolute path is supported.
Sets
slurm_node_setsvalue.
bootDisk-
Sets
bootDiskvalue.image-
Sets
imagevalue. sizeGb-
Required, sets
sizeGbvalue. type-
Required, sets
typevalue.
computeId-
Sets
computeIdvalue. container-resource-labels-
Sets
container-resource-labelsvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.
container-startup-script-
Sets
container-startup-scriptvalue. id-
Required, sets
idvalue. labels-
Sets
labelsvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.
maxDynamicNodeCount-
Sets
maxDynamicNodeCountvalue. serviceAccount-
Sets
serviceAccountvalue.email-
Sets
emailvalue. scopes-
Sets
scopesvalue.
startupScript-
Sets
startupScriptvalue. startupScriptTimeout-
Sets
startupScriptTimeoutvalue. staticNodeCount-
Sets
staticNodeCountvalue.
Shorthand Example:--slurm-node-sets=bootDisk={image=string,sizeGb=int,type=string},computeId=string,container-resource-labels={string=string},container-startup-script=string,id=string,labels={string=string},maxDynamicNodeCount=int,serviceAccount={email=string,scopes},startupScript=string,startupScriptTimeout=string,staticNodeCount=int --slurm-node-sets=bootDisk={image=string,sizeGb=int,type=string},computeId=string,container-resource-labels={string=string},container-startup-script=string,id=string,labels={string=string},maxDynamicNodeCount=int,serviceAccount={email=string,scopes},startupScript=string,startupScriptTimeout=string,staticNodeCount=int
JSON Example:--slurm-node-sets='[{"bootDisk": {"image": "string", "sizeGb": int, "type": "string"}, "computeId": "string", "container-resource-labels": {"string": "string"}, "container-startup-script": "string", "id": "string", "labels": {"string": "string"}, "maxDynamicNodeCount": int, "serviceAccount": {"email": "string", "scopes"}, "startupScript": "string", "startupScriptTimeout": "string", "staticNodeCount": int}]'
File Example:--slurm-node-sets=path_to_file.(yaml|json)
--slurm-partitions=[exclusive=EXCLUSIVE],[id=ID],[nodesetIds=NODESETIDS]-
Parameters to define slurm cluster partitions.
For e.g. --slurm-partitions id={partitionId},nodesetIds=[{nodesetId1},{nodesetId2}],exclusive=false.
Sets
slurm_partitionsvalue.exclusive-
Sets
exclusivevalue. id-
Required, sets
idvalue. nodesetIds-
Required, sets
nodesetIdsvalue.
Shorthand Example:--slurm-partitions=exclusive=boolean,id=string,nodesetIds=[string] --slurm-partitions=exclusive=boolean,id=string,nodesetIds=[string]
JSON Example:--slurm-partitions='[{"exclusive": boolean, "id": "string", "nodesetIds": ["string"]}]'
File Example:--slurm-partitions=path_to_file.(yaml|json)
--slurm-prolog-scripts=[SLURM_PROLOG_SCRIPTS,…]-
Slurm prolog bash scripts.
For e.g. --slurm-prolog-scripts script1.sh,script2.sh
--slurm-task-epilog-scripts=[SLURM_TASK_EPILOG_SCRIPTS,…]-
Slurm task epilog bash scripts.
For e.g. --slurm-task-epilog-scripts script1.sh,script2.sh
--slurm-task-prolog-scripts=[SLURM_TASK_PROLOG_SCRIPTS,…]-
Slurm task prolog bash scripts.
For e.g. --slurm-task-prolog-scripts script1.sh,script2.sh
--spot-instances=[atmTags=ATMTAGS],[id=ID],[machineType=MACHINETYPE],[terminationAction=TERMINATIONACTION],[zone=ZONE]-
Parameters to define cluster spot instances.
For e.g. --spot-instances id={computeId},zone={zone},machineType={machineType}.
Sets
spot_instancesvalue.atmTags-
Sets
atmTagsvalue.KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.
id-
Required, sets
idvalue. machineType-
Required, sets
machineTypevalue. terminationAction-
Sets
terminationActionvalue. zone-
Required, sets
zonevalue.
Shorthand Example:--spot-instances=atmTags={string=string},id=string,machineType=string,terminationAction=string,zone=string --spot-instances=atmTags={string=string},id=string,machineType=string,terminationAction=string,zone=string
JSON Example:--spot-instances='[{"atmTags": {"string": "string"}, "id": "string", "machineType": "string", "terminationAction": "string", "zone": "string"}]'
File Example:--spot-instances=path_to_file.(yaml|json)
-
Network configuration for the cluster.
Exactly one of these must be specified:
--create-network=[description=DESCRIPTION],[name=NAME]-
Parameters to create a network. Name: Must match the regex
[a-z]([-a-z0-9]*[a-z0-9])?, be 1-63 characters in length, and comply with RFC1035.Description: A description of the network. Maximum of 2048 characters.
For e.g. --create-network name={network},description=
(ALPHA)Creates a Cluster Director resource..Sets
create_networkvalue.description-
Sets
descriptionvalue. name-
Required, sets
namevalue.
Shorthand Example:--create-network=description=string,name=string
JSON Example:--create-network='{"description": "string", "name": "string"}'
File Example:--create-network=path_to_file.(yaml|json)
-
Or at least one of these can be specified:
- Use an existing network source for the cluster.
--network=NETWORK-
Reference of existing network name. If the network is in a different project
(Shared VPC), specify the project ID using --network-project.
For e.g. --network {network}
This flag argument must be specified if any of the other arguments in this group are specified.
--subnet=SUBNET-
Reference of existing subnetwork name. If the subnetwork is in a different
project (Shared VPC), specify the project ID using --network-project.
For e.g. --subnet regions/{region}/subnetworks/{subnetwork}
This flag argument must be specified if any of the other arguments in this group are specified.
--network-project=NETWORK_PROJECT- Project ID of the project containing the network and subnetwork resources, if different from the cluster project (e.g. for Shared VPC).
-
Cluster configuration for provisioning.
- OPTIONAL FLAGS
-
--async- Return immediately, without waiting for the operation in progress to complete.
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$ gcloud helpfor details. - NOTES
- This command is currently in alpha and might change without notice. If this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist.
gcloud alpha cluster-director clusters create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-10 UTC.