gcloud alpha cluster-director clusters create

NAME
gcloud alpha cluster-director clusters create - creates a Cluster Director resource
SYNOPSIS
gcloud alpha cluster-director clusters create(CLUSTER :--location=LOCATION)(--config=[compute=COMPUTE],[computeResources=COMPUTERESOURCES],[description=DESCRIPTION],[labels=LABELS],[name=NAME],[networkResources=NETWORKRESOURCES],[networks=NETWORKS],[orchestrator=ORCHESTRATOR],[storageResources=STORAGERESOURCES],[storages=STORAGES]    | [--slurm-login-node=[bootDisk=BOOTDISK],[count=COUNT],[enableOSLogin=ENABLEOSLOGIN],[enablePublicIPs=ENABLEPUBLICIPS],[labels=LABELS],[machineType=MACHINETYPE],[startupScript=STARTUPSCRIPT],[zone=ZONE]--slurm-node-sets=[computeId=COMPUTEID],[id=ID],[labels=LABELS],[maxDynamicNodeCount=MAXDYNAMICNODECOUNT],[startupScript=STARTUPSCRIPT],[staticNodeCount=STATICNODECOUNT]--slurm-partitions=[exclusive=EXCLUSIVE],[id=ID],[nodesetIds=NODESETIDS] (--create-network=[description=DESCRIPTION],[name=NAME] |--network=NETWORK--subnet=SUBNET) :--buckets=[BUCKETS,…]--create-buckets=[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]--description=DESCRIPTION--dws-flex-instances=[id=ID],[machineType=MACHINETYPE],[maxDuration=MAXDURATION],[zone=ZONE]--filestores=[FILESTORES,…]--labels=[LABELS,…]--lustres=[LUSTRES,…]--on-demand-instances=[id=ID],[machineType=MACHINETYPE],[zone=ZONE]--reserved-instances=[id=ID],[machineType=MACHINETYPE],[reservation=RESERVATION]--slurm-default-partition=SLURM_DEFAULT_PARTITION--spot-instances=[id=ID],[machineType=MACHINETYPE],[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 clustermy-cluster in locationus-central1-a with granular flags, run the following example:
gcloudalphacluster-directorclusterscreatemy-cluster--locationus-central1-a--description"My cluster description"--labelsenv=prod,client=gcloud-cli--create-networkname=network0--create-filestoresname=locations/us-central1-a/instances/filestore0,tier=BASIC_HDD,capacityGb={filestoreSize},fileshare={fileshare}--filestoreslocations/us-central1-a/instances/filestore1--create-bucketsname=bucket0--bucketsbucket1--create-lustresname=locations/us-central1-a/instances/lustre0,capacityGb={lustreSize},filesystem={filesystem}--lustreslocations/us-central1-a/instances/lustre1--reserved-instancesid=compute0,machineType={machineType},reservation=zones/us-central1-a/reservations/{reservation}--slurm-login-nodemachineType={machineType},zone=us-central1-a--slurm-node-setsid=nodeset0,computeId=compute0--slurm-partitionsid=partition0,nodesetIds=[nodeset0]--slurm-default-partitionpartition0--formatjson

To create a clustermy-cluster in locationus-central1-a with config in JSON string format run the followingexample:

gcloudalphacluster-directorclusterscreatemy-cluster--location=us-central1-a--config='{"key": "value"}'

Or create a JSON filemy-cluster-config.json with the cluster specsand run the following file example:

gcloudalphacluster-directorclusterscreatemy-cluster--location=us-central1-a--config=my-cluster-config.json
POSITIONAL ARGUMENTS
Cluster resource - Name of the cluster resource. Formats: cluster |projects/{project}/locations/{locations}/clusters/{cluster} The arguments inthis group can be used to specify the attributes of this resource. (NOTE) Someattributes are not given arguments in this group but can be set in other ways.

To set theproject attribute:

  • provide the argumentcluster on the command line with a fullyspecified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

This must be specified.

CLUSTER
ID of the cluster or fully qualified identifier for the cluster.

To set thecluster attribute:

  • provide the argumentcluster on the command line.

This positional argument must be specified if any of the other arguments in thisgroup are specified.

--location=LOCATION
The location id of the cluster resource.

To set thelocation attribute:

  • provide the argumentcluster on the command line with a fullyspecified name;
  • provide the argument--location on the command line.
REQUIRED FLAGS
Cluster configuration for provisioning.

Exactly one of these must be specified:

--config=[compute=COMPUTE],[computeResources=COMPUTERESOURCES],[description=DESCRIPTION],[labels=LABELS],[name=NAME],[networkResources=NETWORKRESOURCES],[networks=NETWORKS],[orchestrator=ORCHESTRATOR],[storageResources=STORAGERESOURCES],[storages=STORAGES]
Configuration of the cluster specs in the form of a JSON object. Setsconfig value.
compute
Setscompute value.
resourceRequests
SetsresourceRequests value.
disks
Setsdisks value.
boot
Required, setsboot value.
sizeGb
SetssizeGb value.
sourceImage
SetssourceImage value.
type
Required, setstype value.
id
Setsid value.
machineType
SetsmachineType value.
maxRunDuration
SetsmaxRunDuration value.
provisioningModel
SetsprovisioningModel value.
reservationAffinity
SetsreservationAffinity value.
key
Setskey value.
type
Setstype value.
values
Setsvalues value.
terminationAction
SetsterminationAction value.
zone
Setszone value.
computeResources
SetscomputeResources value.
KEY
SetsKEY value.
VALUE
SetsVALUE value.
config
Setsconfig value.
newDwsFlexInstances
SetsnewDwsFlexInstances value.
atmTags
SetsatmTags value.
KEY
SetsKEY value.
VALUE
SetsVALUE value.
bootDisk
SetsbootDisk value.
boot
Required, setsboot value.
sizeGb
SetssizeGb value.
sourceImage
SetssourceImage value.
type
Required, setstype value.
machineType
SetsmachineType value.
maxDuration
SetsmaxDuration value.
terminationAction
SetsterminationAction value.
zone
Setszone value.
newFlexStartInstances
SetsnewFlexStartInstances value.
atmTags
SetsatmTags value.
KEY
SetsKEY value.
VALUE
SetsVALUE value.
bootDisk
SetsbootDisk value.
boot
Required, setsboot value.
sizeGb
SetssizeGb value.
sourceImage
SetssourceImage value.
type
Required, setstype value.
machineType
SetsmachineType value.
maxDuration
SetsmaxDuration value.
terminationAction
SetsterminationAction value.
zone
Setszone value.
newOnDemandInstances
SetsnewOnDemandInstances value.
atmTags
SetsatmTags value.
KEY
SetsKEY value.
VALUE
SetsVALUE value.
bootDisk
SetsbootDisk value.
boot
Required, setsboot value.
sizeGb
SetssizeGb value.
sourceImage
SetssourceImage value.
type
Required, setstype value.
machineType
SetsmachineType value.
zone
Setszone value.
newReservedInstances
SetsnewReservedInstances value.
atmTags
SetsatmTags value.
KEY
SetsKEY value.
VALUE
SetsVALUE value.
bootDisk
SetsbootDisk value.
boot
Required, setsboot value.
sizeGb
SetssizeGb value.
sourceImage
SetssourceImage value.
type
Required, setstype value.
machineType
SetsmachineType value.
reservation
Setsreservation value.
reservationBlock
SetsreservationBlock value.
reservationSubBlock
SetsreservationSubBlock value.
type
Setstype value.
zone
Setszone value.
newSpotInstances
SetsnewSpotInstances value.
atmTags
SetsatmTags value.
KEY
SetsKEY value.
VALUE
SetsVALUE value.
bootDisk
SetsbootDisk value.
boot
Required, setsboot value.
sizeGb
SetssizeGb value.
sourceImage
SetssourceImage value.
type
Required, setstype value.
machineType
SetsmachineType value.
terminationAction
SetsterminationAction value.
zone
Setszone value.
description
Setsdescription value.
labels
Setslabels value.
KEY
SetsKEY value.
VALUE
SetsVALUE value.
name
Setsname value.
networkResources
SetsnetworkResources value.
KEY
SetsKEY value.
VALUE
SetsVALUE value.
config
Setsconfig value.
existingComputeNetwork
SetsexistingComputeNetwork value.
network
Setsnetwork value.
subnetwork
Setssubnetwork value.
existingNetwork
SetsexistingNetwork value.
network
Setsnetwork value.
subnetwork
Setssubnetwork value.
newComputeNetwork
SetsnewComputeNetwork value.
description
Setsdescription value.
network
Setsnetwork value.
newNetwork
SetsnewNetwork value.
description
Setsdescription value.
network
Setsnetwork value.
networks
Setsnetworks value.
initializeParams
SetsinitializeParams value.
description
Setsdescription value.
network
Setsnetwork value.
networkSource
SetsnetworkSource value.
network
Setsnetwork value.
subnetwork
Setssubnetwork value.
orchestrator
Setsorchestrator value.
slurm
Setsslurm value.
config
Setsconfig value.
accountingStorageEnforceFlags
SetsaccountingStorageEnforceFlags value.
preemptExemptTime
SetspreemptExemptTime value.
preemptMode
SetspreemptMode value.
preemptType
SetspreemptType value.
priorityType
SetspriorityType value.
priorityWeightAge
SetspriorityWeightAge value.
priorityWeightAssoc
SetspriorityWeightAssoc value.
priorityWeightFairshare
SetspriorityWeightFairshare value.
priorityWeightJobSize
SetspriorityWeightJobSize value.
priorityWeightPartition
SetspriorityWeightPartition value.
priorityWeightQos
SetspriorityWeightQos value.
priorityWeightTres
SetspriorityWeightTres value.
prologEpilogTimeout
SetsprologEpilogTimeout value.
prologFlags
SetsprologFlags value.
requeueExitCodes
SetsrequeueExitCodes value.
requeueHoldExitCodes
SetsrequeueHoldExitCodes value.
defaultPartition
SetsdefaultPartition value.
epilogBashScripts
SetsepilogBashScripts value.
loginNodes
SetsloginNodes value.
bootDisk
SetsbootDisk value.
image
Setsimage value.
sizeGb
Required, setssizeGb value.
type
Required, setstype value.
count
Setscount value.
disks
Setsdisks value.
boot
Required, setsboot value.
sizeGb
SetssizeGb value.
sourceImage
SetssourceImage value.
type
Required, setstype value.
enableOsLogin
SetsenableOsLogin value.
enablePublicIps
SetsenablePublicIps value.
labels
Setslabels value.
KEY
SetsKEY value.
VALUE
SetsVALUE value.
machineType
SetsmachineType value.
serviceAccount
SetsserviceAccount value.
email
Setsemail value.
scopes
Setsscopes value.
startupScript
SetsstartupScript value.
storageConfigs
SetsstorageConfigs value.
id
Setsid value.
localMount
SetslocalMount value.
zone
Setszone value.
nodeSets
SetsnodeSets value.
bootDisk
SetsbootDisk value.
boot
Required, setsboot value.
sizeGb
SetssizeGb value.
sourceImage
SetssourceImage value.
type
Required, setstype value.
canIpForward
SetscanIpForward value.
computeId
SetscomputeId value.
computeInstance
SetscomputeInstance value.
bootDisk
SetsbootDisk value.
image
Setsimage value.
sizeGb
Required, setssizeGb value.
type
Required, setstype value.
labels
Setslabels value.
KEY
SetsKEY value.
VALUE
SetsVALUE value.
startupScript
SetsstartupScript value.
containerNodePool
SetscontainerNodePool value.
enableOsLogin
SetsenableOsLogin value.
enablePublicIps
SetsenablePublicIps value.
id
Setsid value.
labels
Setslabels value.
KEY
SetsKEY value.
VALUE
SetsVALUE value.
maxDynamicNodeCount
SetsmaxDynamicNodeCount value.
resourceRequestId
SetsresourceRequestId value.
serviceAccount
SetsserviceAccount value.
email
Setsemail value.
scopes
Setsscopes value.
startupScript
SetsstartupScript value.
staticNodeCount
SetsstaticNodeCount value.
storageConfigs
SetsstorageConfigs value.
id
Setsid value.
localMount
SetslocalMount value.
partitions
Setspartitions value.
exclusive
Setsexclusive value.
id
Setsid value.
nodeSetIds
SetsnodeSetIds value.
prologBashScripts
SetsprologBashScripts value.
taskEpilogBashScripts
SetstaskEpilogBashScripts value.
taskPrologBashScripts
SetstaskPrologBashScripts value.
storageResources
SetsstorageResources value.
KEY
SetsKEY value.
VALUE
SetsVALUE value.
config
Setsconfig value.
existingBucket
SetsexistingBucket value.
bucket
Setsbucket value.
existingFilestore
SetsexistingFilestore value.
filestore
Setsfilestore value.
existingLustre
SetsexistingLustre value.
lustre
Setslustre value.
newBucket
SetsnewBucket value.
autoclass
Setsautoclass value.
enabled
Setsenabled value.
terminalStorageClass
SetsterminalStorageClass value.
bucket
Setsbucket value.
hierarchicalNamespace
SetshierarchicalNamespace value.
enabled
Setsenabled value.
storageClass
SetsstorageClass value.
newFilestore
SetsnewFilestore value.
description
Setsdescription value.
fileShares
SetsfileShares value.
capacityGb
SetscapacityGb value.
fileShare
SetsfileShare value.
filestore
Setsfilestore value.
protocol
Setsprotocol value.
tier
Setstier value.
newLustre
SetsnewLustre value.
capacityGb
SetscapacityGb value.
description
Setsdescription value.
filesystem
Setsfilesystem value.
lustre
Setslustre value.
perUnitStorageThroughput
SetsperUnitStorageThroughput value.
storages
Setsstorages value.
id
Setsid value.
initializeParams
SetsinitializeParams value.
filestore
Setsfilestore value.
description
Setsdescription value.
fileShares
SetsfileShares value.
capacityGb
SetscapacityGb value.
fileShare
SetsfileShare value.
filestore
Setsfilestore value.
protocol
Setsprotocol value.
tier
Setstier value.
gcs
Setsgcs value.
autoclass
Setsautoclass value.
enabled
Setsenabled value.
terminalStorageClass
SetsterminalStorageClass value.
bucket
Setsbucket value.
hierarchicalNamespace
SetshierarchicalNamespace value.
enabled
Setsenabled value.
storageClass
SetsstorageClass value.
lustre
Setslustre value.
capacityGb
SetscapacityGb value.
description
Setsdescription value.
filesystem
Setsfilesystem value.
lustre
Setslustre value.
storageSource
SetsstorageSource value.
bucket
Setsbucket value.
filestore
Setsfilestore value.
lustre
Setslustre value.
Shorthand Example:
--config=compute={resourceRequests=[{disks=[{boot=boolean,sizeGb=int,sourceImage=string,type=string}],id=string,machineType=string,maxRunDuration=int,provisioningModel=string,reservationAffinity={key=string,type=string,values},terminationAction=string,zone=string}]},computeResources={string={config={newDwsFlexInstances={atmTags={string=string},bootDisk={boot=boolean,sizeGb=int,sourceImage=string,type=string},machineType=string,maxDuration=string,terminationAction=string,zone=string},newFlexStartInstances={atmTags={string=string},bootDisk={boot=boolean,sizeGb=int,sourceImage=string,type=string},machineType=string,maxDuration=string,terminationAction=string,zone=string},newOnDemandInstances={atmTags={string=string},bootDisk={boot=boolean,sizeGb=int,sourceImage=string,type=string},machineType=string,zone=string},newReservedInstances={atmTags={string=string},bootDisk={boot=boolean,sizeGb=int,sourceImage=string,type=string},machineType=string,reservation=string,reservationBlock=string,reservationSubBlock=string,type=string,zone=string},newSpotInstances={atmTags={string=string},bootDisk={boot=boolean,sizeGb=int,sourceImage=string,type=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}}}},networks=[{initializeParams={description=string,network=string},networkSource={network=string,subnetwork=string}}],orchestrator={slurm={config={accountingStorageEnforceFlags,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,epilogBashScripts,loginNodes={bootDisk={image=string,sizeGb=int,type=string},count=int,disks=[{boot=boolean,sizeGb=int,sourceImage=string,type=string}],enableOsLogin=boolean,enablePublicIps=boolean,labels={string=string},machineType=string,serviceAccount={email=string,scopes},startupScript=string,storageConfigs=[{id=string,localMount=string}],zone=string},nodeSets=[{bootDisk={boot=boolean,sizeGb=int,sourceImage=string,type=string},canIpForward=boolean,computeId=string,computeInstance={bootDisk={image=string,sizeGb=int,type=string},labels={string=string},startupScript=string},containerNodePool,enableOsLogin=boolean,enablePublicIps=boolean,id=string,labels={string=string},maxDynamicNodeCount=int,resourceRequestId=string,serviceAccount={email=string,scopes},startupScript=string,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}}}},storages=[{id=string,initializeParams={filestore={description=string,fileShares=[{capacityGb=int,fileShare=string}],filestore=string,protocol=string,tier=string},gcs={autoclass={enabled=boolean,terminalStorageClass=string},bucket=string,hierarchicalNamespace={enabled=boolean},storageClass=string},lustre={capacityGb=int,description=string,filesystem=string,lustre=string}},storageSource={bucket=string,filestore=string,lustre=string}}]

JSON Example:

--config='{"compute": {"resourceRequests": [{"disks": [{"boot": boolean, "sizeGb": int, "sourceImage": "string", "type": "string"}], "id": "string", "machineType": "string", "maxRunDuration": int, "provisioningModel": "string", "reservationAffinity": {"key": "string", "type": "string", "values"}, "terminationAction": "string", "zone": "string"}]}, "computeResources": {"string": {"config": {"newDwsFlexInstances": {"atmTags": {"string": "string"}, "bootDisk": {"boot": boolean, "sizeGb": int, "sourceImage": "string", "type": "string"}, "machineType": "string", "maxDuration": "string", "terminationAction": "string", "zone": "string"}, "newFlexStartInstances": {"atmTags": {"string": "string"}, "bootDisk": {"boot": boolean, "sizeGb": int, "sourceImage": "string", "type": "string"}, "machineType": "string", "maxDuration": "string", "terminationAction": "string", "zone": "string"}, "newOnDemandInstances": {"atmTags": {"string": "string"}, "bootDisk": {"boot": boolean, "sizeGb": int, "sourceImage": "string", "type": "string"}, "machineType": "string", "zone": "string"}, "newReservedInstances": {"atmTags": {"string": "string"}, "bootDisk": {"boot": boolean, "sizeGb": int, "sourceImage": "string", "type": "string"}, "machineType": "string", "reservation": "string", "reservationBlock": "string", "reservationSubBlock": "string", "type": "string", "zone": "string"}, "newSpotInstances": {"atmTags": {"string": "string"}, "bootDisk": {"boot": boolean, "sizeGb": int, "sourceImage": "string", "type": "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"}}}}, "networks": [{"initializeParams": {"description": "string", "network": "string"}, "networkSource": {"network": "string", "subnetwork": "string"}}], "orchestrator": {"slurm": {"config": {"accountingStorageEnforceFlags", "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", "epilogBashScripts", "loginNodes": {"bootDisk": {"image": "string", "sizeGb": int, "type": "string"}, "count": int, "disks": [{"boot": boolean, "sizeGb": int, "sourceImage": "string", "type": "string"}], "enableOsLogin": boolean, "enablePublicIps": boolean, "labels": {"string": "string"}, "machineType": "string", "serviceAccount": {"email": "string", "scopes"}, "startupScript": "string", "storageConfigs": [{"id": "string", "localMount": "string"}], "zone": "string"}, "nodeSets": [{"bootDisk": {"boot": boolean, "sizeGb": int, "sourceImage": "string", "type": "string"}, "canIpForward": boolean, "computeId": "string", "computeInstance": {"bootDisk": {"image": "string", "sizeGb": int, "type": "string"}, "labels": {"string": "string"}, "startupScript": "string"}, "containerNodePool": {}, "enableOsLogin": boolean, "enablePublicIps": boolean, "id": "string", "labels": {"string": "string"}, "maxDynamicNodeCount": int, "resourceRequestId": "string", "serviceAccount": {"email": "string", "scopes"}, "startupScript": "string", "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}}}}, "storages": [{"id": "string", "initializeParams": {"filestore": {"description": "string", "fileShares": [{"capacityGb": int, "fileShare": "string"}], "filestore": "string", "protocol": "string", "tier": "string"}, "gcs": {"autoclass": {"enabled": boolean, "terminalStorageClass": "string"}, "bucket": "string", "hierarchicalNamespace": {"enabled": boolean}, "storageClass": "string"}, "lustre": {"capacityGb": int, "description": "string", "filesystem": "string", "lustre": "string"}}, "storageSource": {"bucket": "string", "filestore": "string", "lustre": "string"}}]}'

File Example:

--config=path_to_file.(yaml|json)
Flag Configurations to define cluster spec.
--slurm-login-node=[bootDisk=BOOTDISK],[count=COUNT],[enableOSLogin=ENABLEOSLOGIN],[enablePublicIPs=ENABLEPUBLICIPS],[labels=LABELS],[machineType=MACHINETYPE],[startupScript=STARTUPSCRIPT],[zone=ZONE]
Parameters to define slurm cluster login node.

For e.g. --slurm-login-nodemachineType={machineType},zone={zone},count={count},enableOSLogin=true,enablePublicIPs=true,startupScript="echohello",labels="{key1=value1,key2=value2}"

Defaults:

  • count: 1
  • enableOSLogin: true
  • enablePublicIPs: true

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, setsslurm_login_node value.

bootDisk
SetsbootDisk value.
image
Setsimage value.
sizeGb
Required, setssizeGb value.
type
Required, setstype value.
count
Setscount value.
enableOSLogin
SetsenableOSLogin value.
enablePublicIPs
SetsenablePublicIPs value.
labels
Setslabels value.
KEY
SetsKEY value.
VALUE
SetsVALUE value.
machineType
Required, setsmachineType value.
startupScript
SetsstartupScript value.
zone
Required, setszone value.
Shorthand Example:
--slurm-login-node=bootDisk={image=string,sizeGb=int,type=string},count=int,enableOSLogin=boolean,enablePublicIPs=boolean,labels={string=string},machineType=string,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", "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 groupare specified.

--slurm-node-sets=[computeId=COMPUTEID],[id=ID],[labels=LABELS],[maxDynamicNodeCount=MAXDYNAMICNODECOUNT],[startupScript=STARTUPSCRIPT],[staticNodeCount=STATICNODECOUNT]
Parameters to define slurm cluster nodeset config.

For e.g. --slurm-node-setsid={nodesetId},computeId={computeId},staticNodeCount={staticNodeCount},maxDynamicNodeCount={maxDynamicNodeCount},startupScript="echohello",labels="{key1=value1,key2=value2}"

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.

    Required, setsslurm_node_sets value.

computeId
Required, setscomputeId value.
id
Required, setsid value.
labels
Setslabels value.
KEY
SetsKEY value.
VALUE
SetsVALUE value.
maxDynamicNodeCount
SetsmaxDynamicNodeCount value.
startupScript
SetsstartupScript value.
staticNodeCount
SetsstaticNodeCount value.
Shorthand Example:
--slurm-node-sets=computeId=string,id=string,labels={string=string},maxDynamicNodeCount=int,startupScript=string,staticNodeCount=int--slurm-node-sets=computeId=string,id=string,labels={string=string},maxDynamicNodeCount=int,startupScript=string,staticNodeCount=int

JSON Example:

--slurm-node-sets='[{"computeId": "string", "id": "string", "labels": {"string": "string"}, "maxDynamicNodeCount": int, "startupScript": "string", "staticNodeCount": int}]'

File Example:

--slurm-node-sets=path_to_file.(yaml|json)

This flag argument must be specified if any of the other arguments in this groupare specified.

--slurm-partitions=[exclusive=EXCLUSIVE],[id=ID],[nodesetIds=NODESETIDS]
Parameters to define slurm cluster partitions.

For e.g. --slurm-partitionsid={partitionId},nodesetIds=[{nodesetId1},{nodesetId2}],exclusive=false.

Required, setsslurm_partitions value.

exclusive
Setsexclusive value.
id
Required, setsid value.
nodesetIds
Required, setsnodesetIds value.
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)

This flag argument must be specified if any of the other arguments in this groupare specified.

--buckets=[BUCKETS,…]
Reference of existing Google Cloud Storage bucket.

For e.g. --buckets {bucket-path}

--create-buckets=[enableAutoclass=ENABLEAUTOCLASS],[enableHNS=ENABLEHNS],[name=NAME],[storageClass=STORAGECLASS]
Parameters to create a Google Cloud Storage bucket.

For e.g. --create-buckets name={bucket-path}

Supported storageClass values:

  • STANDARD
  • NEARLINE
  • COLDLINE
  • ARCHIVE

Defaults:

  • storageClass: STANDARD

Note:

  • Either storageClass or enableAutoclass can be set.
  • if enableAutoclass is set, enableHNS should not be set.
  • HNS: Hierarchical namespace.

Setscreate_buckets value.

enableAutoclass
SetsenableAutoclass value.
enableHNS
SetsenableHNS value.
name
Required, setsname value.
storageClass
SetsstorageClass value.
Shorthand Example:
--create-buckets=enableAutoclass=boolean,enableHNS=boolean,name=string,storageClass=string--create-buckets=enableAutoclass=boolean,enableHNS=boolean,name=string,storageClass=string

JSON Example:

--create-buckets='[{"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-filestoresname=locations/{location}/instances/{filestore},tier=REGIONAL,capacityGb={filestoreSize},fileshare={fileshare}

Supported tier values:

  • ZONAL
  • REGIONAL

Supported protocol values:

  • NFSV3
  • NFSV41
  • If not specified, defaults to NFSV3

Defaults:

  • protocol: NFSV3.

Setscreate_filestores value.

capacityGb
Required, setscapacityGb value.
description
Setsdescription value.
fileshare
Required, setsfileshare value.
name
Required, setsname value.
protocol
Setsprotocol value.
tier
Required, setstier value.
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]
Parameters to create a Lustre instance.

For e.g. --create-lustresname=locations/{location}/instances/{lustre},capacityGb={lustreSize},filesystem={filesystem}.

Setscreate_lustres value.

capacityGb
Required, setscapacityGb value.
description
Setsdescription value.
filesystem
Required, setsfilesystem value.
name
Required, setsname value.
Shorthand Example:
--create-lustres=capacityGb=int,description=string,filesystem=string,name=string--create-lustres=capacityGb=int,description=string,filesystem=string,name=string

JSON Example:

--create-lustres='[{"capacityGb": int, "description": "string", "filesystem": "string", "name": "string"}]'

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.

--dws-flex-instances=[id=ID],[machineType=MACHINETYPE],[maxDuration=MAXDURATION],[zone=ZONE]
Parameters to define cluster DWS Flex instances.

For e.g. --dws-flex-instancesid={computeId},zone={zone},machineType={machineType},maxDuration=10000s.

Setsdws_flex_instances value.

id
Required, setsid value.
machineType
Required, setsmachineType value.
maxDuration
Required, setsmaxDuration value.
zone
Required, setszone value.
Shorthand Example:
--dws-flex-instances=id=string,machineType=string,maxDuration=string,zone=string--dws-flex-instances=id=string,machineType=string,maxDuration=string,zone=string

JSON Example:

--dws-flex-instances='[{"id": "string", "machineType": "string", "maxDuration": "string", "zone": "string"}]'

File Example:

--dws-flex-instances=path_to_file.(yaml|json)
--filestores=[FILESTORES,…]
Reference of existing filestore instance.

For e.g. --filestores locations/{location}/instances/{filestore}

--labels=[LABELS,…]
Cluster labels as key value pairs.

For e.g. --labels key1=value1,key2=value2.

Setslabels value.

KEY
SetsKEY value.
VALUE
SetsVALUE value.
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=[id=ID],[machineType=MACHINETYPE],[zone=ZONE]
Parameters to define cluster on demand instances.

For e.g. --on-demand-instancesid={computeId},zone={zone},machineType={machineType}.

Setson_demand_instances value.

id
Required, setsid value.
machineType
Required, setsmachineType value.
zone
Required, setszone value.
Shorthand Example:
--on-demand-instances=id=string,machineType=string,zone=string--on-demand-instances=id=string,machineType=string,zone=string

JSON Example:

--on-demand-instances='[{"id": "string", "machineType": "string", "zone": "string"}]'

File Example:

--on-demand-instances=path_to_file.(yaml|json)
--reserved-instances=[id=ID],[machineType=MACHINETYPE],[reservation=RESERVATION]
Parameters to define cluster reserved instances.

For e.g. --reserved-instancesid={computeId},reservation=zones/{zone}/reservations/{reservation},machineType={machineType}.

Setsreserved_instances value.

id
Required, setsid value.
machineType
Required, setsmachineType value.
reservation
Required, setsreservation value.
Shorthand Example:
--reserved-instances=id=string,machineType=string,reservation=string--reserved-instances=id=string,machineType=string,reservation=string

JSON Example:

--reserved-instances='[{"id": "string", "machineType": "string", "reservation": "string"}]'

File Example:

--reserved-instances=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}

--spot-instances=[id=ID],[machineType=MACHINETYPE],[zone=ZONE]
Parameters to define cluster spot instances.

For e.g. --spot-instances id={computeId},zone={zone},machineType={machineType}.

Setsspot_instances value.

id
Required, setsid value.
machineType
Required, setsmachineType value.
zone
Required, setszone value.
Shorthand Example:
--spot-instances=id=string,machineType=string,zone=string--spot-instances=id=string,machineType=string,zone=string

JSON Example:

--spot-instances='[{"id": "string", "machineType": "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.

For e.g. --create-network name={network},description=(ALPHA)Creates a Cluster Director resource..

Setscreate_network value.

description
Setsdescription value.
name
Required, setsname value.
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)
Use an existing network source for the cluster.
--network=NETWORK
Reference of existing network name.

For e.g. --network {network}

This flag argument must be specified if any of the other arguments in this groupare specified.

--subnet=SUBNET
Reference of existing subnetwork name.

For e.g. --subnet regions/{region}/subnetworks/{subnetwork}

This flag argument must be specified if any of the other arguments in this groupare specified.

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 help for details.

NOTES
This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-16 UTC.