- 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] |--blueprint=BLUEPRINT--buckets=[id=ID], [name=NAME]--create-buckets=[enableAutoclass=ENABLEAUTOCLASS], [enableHNS=ENABLEHNS], [id=ID], [name=NAME], [storageClass=STORAGECLASS], [terminalStorageClass=TERMINALSTORAGECLASS]--create-filestores=[capacityGb=CAPACITYGB], [description=DESCRIPTION], [fileshare=FILESHARE], [id=ID], [name=NAME], [protocol=PROTOCOL], [tier=TIER]--create-lustres=[capacityGb=CAPACITYGB], [description=DESCRIPTION], [filesystem=FILESYSTEM], [id=ID], [name=NAME], [perUnitStorageThroughput=PERUNITSTORAGETHROUGHPUT]--description=DESCRIPTION--filestores=[id=ID], [name=NAME]--flex-start-instances=[id=ID], [machineType=MACHINETYPE], [maxDuration=MAXDURATION], [zone=ZONE]--labels=[LABELS, …]--lustres=[id=ID], [name=NAME]--on-demand-instances=[id=ID], [machineType=MACHINETYPE], [zone=ZONE]--reserved-instances=[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-login-node=[bootDisk=BOOTDISK], [count=COUNT], [enableOsLogin=ENABLEOSLOGIN], [enablePublicIps=ENABLEPUBLICIPS], [labels=LABELS], [machineType=MACHINETYPE], [startupScript=STARTUPSCRIPT], [storageConfigs=STORAGECONFIGS], [zone=ZONE]--slurm-node-sets=[bootDisk=BOOTDISK], [computeId=COMPUTEID], [computeInstance=COMPUTEINSTANCE], [container-resource-labels=CONTAINER-RESOURCE-LABELS], [container-startup-script=CONTAINER-STARTUP-SCRIPT], [containerNodePool=CONTAINERNODEPOOL], [id=ID], [labels=LABELS], [maxDynamicNodeCount=MAXDYNAMICNODECOUNT], [startupScript=STARTUPSCRIPT], [startupScriptTimeout=STARTUPSCRIPTTIMEOUT], [staticNodeCount=STATICNODECOUNT], [storageConfigs=STORAGECONFIGS], [type=TYPE]--slurm-partitions=[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=[id=ID], [machineType=MACHINETYPE], [terminationAction=TERMINATIONACTION], [zone=ZONE]--create-network=[description=DESCRIPTION], [name=NAME] | [--network=NETWORK--subnet=SUBNET:--network-project=NETWORK_PROJECT]) [--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,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. See example
below:
--config = '{ "networkResources": { "network0": { "config": { "newNetwork": { "network": "network0" } } } }, "storageResources": { "lustre0": { "config": { "newLustre": { "capacityGb": 1200, "filesystem": "lustre-fs" } } } }, "computeResources": { "compute0": { "config": { "newOnDemandInstances": { "machineType": "n2-standard-4", "zone": "us-central1-a" } } } }, "orchestrator": { "slurm": { "nodeSets": [ { "id": "nodeset0", "computeId": "compute0" } ] } }
}' --format json.
Shorthand Example:--config = computeResources ={ string ={ config ={ newDwsFlexInstances ={ machineType = string,maxDuration = string,terminationAction = string,zone = string } ,newFlexStartInstances ={ machineType = string,maxDuration = string,terminationAction = string,zone = string } ,newOnDemandInstances ={ machineType = string,zone = string } ,newReservedInstances ={ machineType = string,reservation = string,reservationBlock = string,reservationSubBlock = string,type = string,zone = string } ,newSpotInstances ={ 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 ={ defaultPartition = string,epilogBashScripts,loginNodes ={ bootDisk ={ image = string,sizeGb = int,storagePools =[ string ] ,type = string } ,count = int,enableOsLogin = boolean,enablePublicIps = boolean,labels ={ string = string } ,machineType = string,startupScript = string,storageConfigs =[{ id = string,localMount = string }] ,zone = string } ,nodeSets =[{ computeId = string,computeInstance ={ bootDisk ={ image = string,sizeGb = int,storagePools =[ string ] ,type = string } ,labels ={ string = string } ,startupScript = string,startupScriptTimeout = string } ,containerNodePool,id = string,maxDynamicNodeCount = int,staticNodeCount = int,storageConfigs =[{ id = string,localMount = string }]}] ,partitions =[{ id = string,nodeSetIds =[ string ]}] ,prologBashScripts }} ,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,id = string,protocol = string,tier = string } ,newLustre ={ capacityGb = int,description = string,filesystem = string,id = string,lustre = string,perUnitStorageThroughput = int }}}}
JSON Example:--config = '{"computeResources": {"string": {"config": {"newDwsFlexInstances": {"machineType": "string", "maxDuration": "string", "terminationAction": "string", "zone": "string"}, "newFlexStartInstances": {"machineType": "string", "maxDuration": "string", "terminationAction": "string", "zone": "string"}, "newOnDemandInstances": {"machineType": "string", "zone": "string"}, "newReservedInstances": {"machineType": "string", "reservation": "string", "reservationBlock": "string", "reservationSubBlock": "string", "type": "string", "zone": "string"}, "newSpotInstances": {"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": {"defaultPartition": "string", "epilogBashScripts", "loginNodes": {"bootDisk": {"image": "string", "sizeGb": int, "storagePools": ["string"], "type": "string"}, "count": int, "enableOsLogin": boolean, "enablePublicIps": boolean, "labels": {"string": "string"}, "machineType": "string", "startupScript": "string", "storageConfigs": [{"id": "string", "localMount": "string"}], "zone": "string"}, "nodeSets": [{"computeId": "string", "computeInstance": {"bootDisk": {"image": "string", "sizeGb": int, "storagePools": ["string"], "type": "string"}, "labels": {"string": "string"}, "startupScript": "string", "startupScriptTimeout": "string"}, "containerNodePool": {}, "id": "string", "maxDynamicNodeCount": int, "staticNodeCount": int, "storageConfigs": [{"id": "string", "localMount": "string"}]}], "partitions": [{"id": "string", "nodeSetIds": ["string"]}], "prologBashScripts"}}, "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", "id": "string", "protocol": "string", "tier": "string"}, "newLustre": {"capacityGb": int, "description": "string", "filesystem": "string", "id": "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.
-
--blueprint=BLUEPRINT - Reference a pre-defined architecture (e.g., "a3-ultra").
BLUEPRINTmust be one of:a3-ultra,a4-high-flex-start,a4x-high,g4,h4d-highmem. -
--buckets=[id=ID],[name=NAME] - Reference of existing Google Cloud Storage bucket.
id: ID of the bucket resource, used to refer to this resource in storage-configs. name: Name of the existing Cloud Storage bucket to import from your project in the format of bucket-name.
For example --buckets id=my-bucket,name=bucket-1.
Sets
bucketsvalue.-
id - Required, sets
idvalue. -
name - Required, sets
namevalue.
Shorthand Example:--buckets = id = string,name = string --buckets = id = string,name = string
JSON Example:--buckets = '[{"id": "string", "name": "string"}]'
File Example:--buckets = path_to_file. ( yaml | json )
-
-
--create-buckets=[enableAutoclass=ENABLEAUTOCLASS],[enableHNS=ENABLEHNS],[id=ID],[name=NAME],[storageClass=STORAGECLASS],[terminalStorageClass=TERMINALSTORAGECLASS] - Parameters to create a Google Cloud Storage bucket.
id: ID of the bucket resource, used to refer to this resource in storage-configs. name: Name of the Cloud Storage bucket to create in your project in the format of bucket-1.
For example --create-buckets id=my-bucket,name=bucket-1,storageClass=STANDARD,terminalStorageClass=NEARLINE,enableHNS=true
Supported storageClass values:
- STANDARD
- NEARLINE
- COLDLINE
- ARCHIVE
Supported terminalStorageClass values:
- NEARLINE
- ARCHIVE
Defaults:
- storageClass: STANDARD
Note:
- Either storageClass or enableAutoclass can be set.
- HNS: Hierarchical namespace.
Sets
create_bucketsvalue.-
enableAutoclass - Sets
enableAutoclassvalue. -
enableHNS - Sets
enableHNSvalue. -
id - Required, sets
idvalue. -
name - Required, sets
namevalue. -
storageClass - Sets
storageClassvalue. -
terminalStorageClass - Sets
terminalStorageClassvalue.
Shorthand Example:--create-buckets = enableAutoclass = boolean,enableHNS = boolean,id = string,name = string,storageClass = string,terminalStorageClass = string --create-buckets = enableAutoclass = boolean,enableHNS = boolean,id = string,name = string,storageClass = string,terminalStorageClass = string
JSON Example:--create-buckets = '[{"enableAutoclass": boolean, "enableHNS": boolean, "id": "string", "name": "string", "storageClass": "string", "terminalStorageClass": "string"}]'
File Example:--create-buckets = path_to_file. ( yaml | json )
-
--create-filestores=[capacityGb=CAPACITYGB],[description=DESCRIPTION],[fileshare=FILESHARE],[id=ID],[name=NAME],[protocol=PROTOCOL],[tier=TIER] - Parameters to create a filestore instance.
For example --create-filestores id=my-fs,name=locations/us-central1/instances/filestore-1,tier=REGIONAL,capacityGb=1024,fileshare=share1
id: ID of the filestore resource, used to refer to this resource in storage-configs. name: Name of the filestore instance to create in your project in the format of locations/us-central1/instances/filestore-1.
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. -
id - Required, sets
idvalue. -
name - Required, sets
namevalue. -
protocol - Sets
protocolvalue. -
tier - Required, sets
tiervalue.
Shorthand Example:--create-filestores = capacityGb = int,description = string,fileshare = string,id = string,name = string,protocol = string,tier = string --create-filestores = capacityGb = int,description = string,fileshare = string,id = string,name = string,protocol = string,tier = string
JSON Example:--create-filestores = '[{"capacityGb": int, "description": "string", "fileshare": "string", "id": "string", "name": "string", "protocol": "string", "tier": "string"}]'
File Example:--create-filestores = path_to_file. ( yaml | json )
-
--create-lustres=[capacityGb=CAPACITYGB],[description=DESCRIPTION],[filesystem=FILESYSTEM],[id=ID],[name=NAME],[perUnitStorageThroughput=PERUNITSTORAGETHROUGHPUT] - Parameters to create a Lustre instance.
id: ID of the lustre resource, used to refer to this resource in storage-configs. name: Name of the Managed Lustre instance to create in your project in the format of locations/us-central1/instances/lustre-1.
For example --create-lustres id=my-lustre,name=locations/us-central1/instances/lustre-1,capacityGb=1024,filesystem=fs-1,perUnitStorageThroughput=1000
Values for perUnitStorageThroughput: 125, 250, 500, 1000.
Sets
create_lustresvalue.-
capacityGb - Required, sets
capacityGbvalue. -
description - Sets
descriptionvalue. -
filesystem - Required, sets
filesystemvalue. -
id - Required, sets
idvalue. -
name - Required, sets
namevalue. -
perUnitStorageThroughput - Sets
perUnitStorageThroughputvalue.
Shorthand Example:--create-lustres = capacityGb = int,description = string,filesystem = string,id = string,name = string,perUnitStorageThroughput = int --create-lustres = capacityGb = int,description = string,filesystem = string,id = string,name = string,perUnitStorageThroughput = int
JSON Example:--create-lustres = '[{"capacityGb": int, "description": "string", "filesystem": "string", "id": "string", "name": "string", "perUnitStorageThroughput": int}]'
File Example:--create-lustres = path_to_file. ( yaml | json )
-
-
--description=DESCRIPTION - Description of the cluster.
For example --description "My cluster"
-
--filestores=[id=ID],[name=NAME] - Reference of existing filestore instance.
id: ID of the filestore resource, used to refer to this resource in storage-configs. name: Name of the existing filestore instance to import from your project in the format of locations/us-central1/instances/filestore-1.
For example --filestores id=my-fs,name=locations/us-central1/instances/filestore-1.
Sets
filestoresvalue.-
id - Required, sets
idvalue. -
name - Required, sets
namevalue.
Shorthand Example:--filestores = id = string,name = string --filestores = id = string,name = string
JSON Example:--filestores = '[{"id": "string", "name": "string"}]'
File Example:--filestores = path_to_file. ( yaml | json )
-
-
--flex-start-instances=[id=ID],[machineType=MACHINETYPE],[maxDuration=MAXDURATION],[zone=ZONE] - Parameters to define cluster Flex Start instances.
For example --flex-start-instances id=c1,zone=us-central1-a,machineType=n1-standard-1,maxDuration=10000s.
Sets
flex_start_instancesvalue.-
id - Required, sets
idvalue. -
machineType - Required, sets
machineTypevalue. -
maxDuration - Required, sets
maxDurationvalue. -
zone - Required, sets
zonevalue.
Shorthand Example:--flex-start-instances = id = string,machineType = string,maxDuration = string,zone = string --flex-start-instances = id = string,machineType = string,maxDuration = string,zone = string
JSON Example:--flex-start-instances = '[{"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 example --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=[id=ID],[name=NAME] - Reference of existing Lustre instance.
id: ID of the lustre resource, used to refer to this resource in storage-configs. name: Name of the existing Managed Lustre instance to import from your project in the format of locations/us-central1/instances/lustre-1.
For example --lustres id=my-lustre,name=locations/us-central1/instances/lustre-1.
Sets
lustresvalue.-
id - Required, sets
idvalue. -
name - Required, sets
namevalue.
Shorthand Example:--lustres = id = string,name = string --lustres = id = string,name = string
JSON Example:--lustres = '[{"id": "string", "name": "string"}]'
File Example:--lustres = path_to_file. ( yaml | json )
-
-
--on-demand-instances=[id=ID],[machineType=MACHINETYPE],[zone=ZONE] - Parameters to define cluster on demand instances.
For example --on-demand-instances id=c1,zone=us-central1-a,machineType=n1-standard-1.
Sets
on_demand_instancesvalue.-
id - Required, sets
idvalue. -
machineType - Required, sets
machineTypevalue. -
zone - Required, sets
zonevalue.
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],[reservation=RESERVATION],[reservationBlock=RESERVATIONBLOCK],[reservationSubBlock=RESERVATIONSUBBLOCK] - Parameters to define cluster reserved instances.
For example --reserved-instances id=c1,reservation=zones/us-central1-a/reservations/reservation-1
Exactly one of reservation, reservation-block, or reservation-sub-block must be provided. reservation: The name of the reservation to use, in the format zones/us-central1-a/reservations/reservation-1. reservationBlock: The name of the reservation block to use, in the format zones/us-central1-a/reservations/reservation-1/reservationBlocks/block-1. reservationSubBlock: The name of the reservation sub-block to use, in the format zones/us-central1-a/reservations/reservation-1/reservationBlocks/block-1/reservationSubBlocks/sub-block-1.
Sets
reserved_instancesvalue.-
id - Required, sets
idvalue. -
reservation - Sets
reservationvalue. -
reservationBlock - Sets
reservationBlockvalue. -
reservationSubBlock - Sets
reservationSubBlockvalue.
Shorthand Example:--reserved-instances = id = string,reservation = string,reservationBlock = string,reservationSubBlock = string --reserved-instances = id = string,reservation = string,reservationBlock = string,reservationSubBlock = string
JSON Example:--reserved-instances = '[{"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 example --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 example --slurm-default-partition p1
-
--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 example --slurm-disable-health-check-program
-
--slurm-epilog-scripts=[SLURM_EPILOG_SCRIPTS,…] - Slurm epilog bash scripts.
For example --slurm-epilog-scripts script1.sh,script2.sh
-
--slurm-login-node=[bootDisk=BOOTDISK],[count=COUNT],[enableOsLogin=ENABLEOSLOGIN],[enablePublicIps=ENABLEPUBLICIPS],[labels=LABELS],[machineType=MACHINETYPE],[startupScript=STARTUPSCRIPT],[storageConfigs=STORAGECONFIGS],[zone=ZONE] - Parameters to define slurm cluster login node.
Required:
- machineType
- zone
For example --slurm-login-node machineType=n1-standard-1,zone=us-central1-a,count=1
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.
- bootDisk:
- Must be 50 GB or greater.
- bootDisk.storagePools:
- At most 1 storage pool is supported.
- storagePools: The name of the storage pool to use, in the format zones/us-central1-a/storagePools/pool1.
Sets
slurm_login_nodevalue.
Shorthand Example:--slurm-login-node = bootDisk ={ image = string,sizeGb = int,storagePools =[ string ] ,type = string } ,count = int,enableOsLogin = boolean,enablePublicIps = boolean,labels ={ string = string } ,machineType = string,startupScript = string,storageConfigs =[{ id = string,localMount = string }] ,zone = string
JSON Example:--slurm-login-node = '{"bootDisk": {"image": "string", "sizeGb": int, "storagePools": ["string"], "type": "string"}, "count": int, "enableOsLogin": boolean, "enablePublicIps": boolean, "labels": {"string": "string"}, "machineType": "string", "startupScript": "string", "storageConfigs": [{"id": "string", "localMount": "string"}], "zone": "string"}'
File Example:--slurm-login-node = path_to_file. ( yaml | json )
-
--slurm-node-sets=[bootDisk=BOOTDISK],[computeId=COMPUTEID],[computeInstance=COMPUTEINSTANCE],[container-resource-labels=CONTAINER-RESOURCE-LABELS],[container-startup-script=CONTAINER-STARTUP-SCRIPT],[containerNodePool=CONTAINERNODEPOOL],[id=ID],[labels=LABELS],[maxDynamicNodeCount=MAXDYNAMICNODECOUNT],[startupScript=STARTUPSCRIPT],[startupScriptTimeout=STARTUPSCRIPTTIMEOUT],[staticNodeCount=STATICNODECOUNT],[storageConfigs=STORAGECONFIGS],[type=TYPE] - Parameters to define slurm cluster nodeset config.
For example --slurm-node-sets id=ns1,computeId=c1,type=gce,staticNodeCount=1,maxDynamicNodeCount=2,startupScript="echo hello",bootDisk=type=hyperdisk-balanced,storagePools=[zones/us-central1-a/storagePools/pool1]
To configure a node set backed by Google Kubernetes Engine, use type=gke. If type=gke is specified, Compute Engine specific fields (labels, startupScript, bootDisk, startupScriptTimeout) cannot be used, but container-specific fields (container-resource-labels, container-startup-script) may be used. For example --slurm-node-sets id=ns1,computeId=c1,type=gke For example --slurm-node-sets id=ns1,computeId=c1,type=gke,container-resource-labels="k1=v1",container-startup-script="echo hello"
Defaults:
- staticNodeCount: 1
- type: gce
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.
- bootDisk.storagePools:
- At most 1 storage pool is supported.
- storagePools: The name of the storage pool to use, in the format zones/us-central1-a/storagePools/pool1.
Sets
slurm_node_setsvalue.
-
bootDisk - Sets
bootDiskvalue.-
image - Sets
imagevalue. -
sizeGb - Required, sets
sizeGbvalue. -
storagePools - Sets
storagePoolsvalue. -
type - Required, sets
typevalue.
-
-
computeId - Sets
computeIdvalue. -
computeInstance - Sets
computeInstancevalue.-
bootDisk - Sets
bootDiskvalue.-
image - Sets
imagevalue. -
sizeGb - Required, sets
sizeGbvalue. -
storagePools - Sets
storagePoolsvalue. -
type - Required, sets
typevalue.
-
-
labels - Sets
labelsvalue.-
KEY - Sets
KEYvalue. -
VALUE - Sets
VALUEvalue.
-
-
startupScript - Sets
startupScriptvalue. -
startupScriptTimeout - Sets
startupScriptTimeoutvalue.
-
-
container-resource-labels - Sets
container-resource-labelsvalue.-
KEY - Sets
KEYvalue. -
VALUE - Sets
VALUEvalue.
-
-
container-startup-script - Sets
container-startup-scriptvalue. -
containerNodePool - Sets
containerNodePoolvalue.-
resourceLabels - Sets
resourceLabelsvalue.-
KEY - Sets
KEYvalue. -
VALUE - Sets
VALUEvalue.
-
-
startupScript - Sets
startupScriptvalue.
-
-
id - Required, sets
idvalue. -
labels - Sets
labelsvalue.-
KEY - Sets
KEYvalue. -
VALUE - Sets
VALUEvalue.
-
-
maxDynamicNodeCount - Sets
maxDynamicNodeCountvalue. -
startupScript - Sets
startupScriptvalue. -
startupScriptTimeout - Sets
startupScriptTimeoutvalue. -
staticNodeCount - Sets
staticNodeCountvalue. -
storageConfigs - Sets
storageConfigsvalue.-
id - Required, sets
idvalue. -
localMount - Required, sets
localMountvalue.
-
-
type - Sets
typevalue.
Shorthand Example:--slurm-node-sets = bootDisk ={ image = string,sizeGb = int,storagePools =[ string ] ,type = string } ,computeId = string,computeInstance ={ bootDisk ={ image = string,sizeGb = int,storagePools =[ string ] ,type = string } ,labels ={ string = string } ,startupScript = string,startupScriptTimeout = string } ,container-resource-labels ={ string = string } ,container-startup-script = string,containerNodePool ={ resourceLabels ={ string = string } ,startupScript = string } ,id = string,labels ={ string = string } ,maxDynamicNodeCount = int,startupScript = string,startupScriptTimeout = string,staticNodeCount = int,storageConfigs =[{ id = string,localMount = string }] ,type = string --slurm-node-sets = bootDisk ={ image = string,sizeGb = int,storagePools =[ string ] ,type = string } ,computeId = string,computeInstance ={ bootDisk ={ image = string,sizeGb = int,storagePools =[ string ] ,type = string } ,labels ={ string = string } ,startupScript = string,startupScriptTimeout = string } ,container-resource-labels ={ string = string } ,container-startup-script = string,containerNodePool ={ resourceLabels ={ string = string } ,startupScript = string } ,id = string,labels ={ string = string } ,maxDynamicNodeCount = int,startupScript = string,startupScriptTimeout = string,staticNodeCount = int,storageConfigs =[{ id = string,localMount = string }] ,type = string
JSON Example:--slurm-node-sets = '[{"bootDisk": {"image": "string", "sizeGb": int, "storagePools": ["string"], "type": "string"}, "computeId": "string", "computeInstance": {"bootDisk": {"image": "string", "sizeGb": int, "storagePools": ["string"], "type": "string"}, "labels": {"string": "string"}, "startupScript": "string", "startupScriptTimeout": "string"}, "container-resource-labels": {"string": "string"}, "container-startup-script": "string", "containerNodePool": {"resourceLabels": {"string": "string"}, "startupScript": "string"}, "id": "string", "labels": {"string": "string"}, "maxDynamicNodeCount": int, "startupScript": "string", "startupScriptTimeout": "string", "staticNodeCount": int, "storageConfigs": [{"id": "string", "localMount": "string"}], "type": "string"}]'
File Example:--slurm-node-sets = path_to_file. ( yaml | json )
-
--slurm-partitions=[id=ID],[nodeSetIds=NODESETIDS] - Parameters to define slurm cluster partitions.
For example --slurm-partitions id=p1,nodesetIds=[ns1,ns2].
Sets
slurm_partitionsvalue.-
id - Required, sets
idvalue. -
nodeSetIds - Required, sets
nodeSetIdsvalue.
Shorthand Example:--slurm-partitions = id = string,nodeSetIds =[ string ] --slurm-partitions = id = string,nodeSetIds =[ string ]
JSON Example:--slurm-partitions = '[{"id": "string", "nodeSetIds": ["string"]}]'
File Example:--slurm-partitions = path_to_file. ( yaml | json )
-
-
--slurm-prolog-scripts=[SLURM_PROLOG_SCRIPTS,…] - Slurm prolog bash scripts.
For example --slurm-prolog-scripts script1.sh,script2.sh
-
--slurm-task-epilog-scripts=[SLURM_TASK_EPILOG_SCRIPTS,…] - Slurm task epilog bash scripts.
For example --slurm-task-epilog-scripts script1.sh,script2.sh
-
--slurm-task-prolog-scripts=[SLURM_TASK_PROLOG_SCRIPTS,…] - Slurm task prolog bash scripts.
For example --slurm-task-prolog-scripts script1.sh,script2.sh
-
--spot-instances=[id=ID],[machineType=MACHINETYPE],[terminationAction=TERMINATIONACTION],[zone=ZONE] - Parameters to define cluster spot instances.
For example --spot-instances id=c1,zone=us-central1-a,machineType=n1-standard-1.
Sets
spot_instancesvalue.-
id - Required, sets
idvalue. -
machineType - Required, sets
machineTypevalue. -
terminationAction - Sets
terminationActionvalue. -
zone - Required, sets
zonevalue.
Shorthand Example:--spot-instances = id = string,machineType = string,terminationAction = string,zone = string --spot-instances = id = string,machineType = string,terminationAction = string,zone = string
JSON Example:--spot-instances = '[{"id": "string", "machineType": "string", "terminationAction": "string", "zone": "string"}]'
File Example:--spot-instances = path_to_file. ( yaml | json )
-
- Network configuration for the cluster.
At most one of these can 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 example --create-network name=network-1,description="My network".
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 example --network network-1
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 example --subnet regions/us-central1/subnetworks/subnet-1
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. This variant is also available:
gcloud beta cluster-director clusters create
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-06-16 UTC.

