gcloud alpha compute sole-tenancy node-groups create

NAME
gcloud alpha compute sole-tenancy node-groups create - create a Compute Engine node group
SYNOPSIS
gcloud alpha compute sole-tenancy node-groups createNAME--node-template=NODE_TEMPLATE--target-size=TARGET_SIZE[--description=DESCRIPTION][--maintenance-interval=MAINTENANCE_INTERVAL][--maintenance-policy=MAINTENANCE_POLICY][--maintenance-window-start-time=START_TIME][--zone=ZONE][--autoscaler-mode=AUTOSCALER_MODE :--max-nodes=MAX_NODES--min-nodes=MIN_NODES][--share-setting=SHARE_SETTING :--share-with=PROJECT,[PROJECT,…]][GCLOUD_WIDE_FLAG]
DESCRIPTION
(ALPHA) Create a Compute Engine node group.
EXAMPLES
To create a node group, run:
gcloudalphacomputesole-tenancynode-groupscreatemy-node-group--node-template=example-template--target-size=4
POSITIONAL ARGUMENTS
NAME
Name of the node group to operate on.
REQUIRED FLAGS
--node-template=NODE_TEMPLATE
The name of the node template resource to be set for this node group.
--target-size=TARGET_SIZE
The target initial number of nodes in the node group.
OPTIONAL FLAGS
--description=DESCRIPTION
An optional description of this resource.
--maintenance-interval=MAINTENANCE_INTERVAL
Specifies the frequency of planned maintenance events.MAINTENANCE_INTERVAL must be one of:
as-needed
hosts are eligible to receive infrastructure and hypervisor updates as theybecome available.
recurrent
hosts receive planned infrastructure and hypervisor updates on a periodic basis,but not more frequently than every 28 days. This minimizes the number of plannedmaintenance operations on individual hosts and reduces the frequency ofdisruptions, both live migrations and terminations, on individual VMs.
--maintenance-policy=MAINTENANCE_POLICY
Determines the maintenance behavior during host maintenance events. For moreinformation, seehttps://cloud.google.com/compute/docs/nodes#maintenance_policies.MAINTENANCE_POLICY must be one of:
default
VM instances on the host are live migrated to a new physical server. This is thedefault setting.
migrate-within-node-group
VM instances on the host are live migrated to another node within the same nodegroup.
restart-in-place
VM instances on the host are terminated and then restarted on the same physicalserver after the maintenance event has completed.
--maintenance-window-start-time=START_TIME
The time (in GMT) when planned maintenance operations window begins. Thepossible values are 00:00, 04:00, 08:00, 12:00, 16:00, 20:00.
--zone=ZONE
Zone of the node group to operate on. If not specified and thecompute/zone property isn't set, you mightbe prompted to select a zone (interactive mode only).

To avoid prompting when this flag is omitted, you can set thecompute/zone property:

gcloudconfigsetcompute/zoneZONE

A list of zones can be fetched by running:

gcloudcomputezoneslist

To unset the property, run:

gcloudconfigunsetcompute/zone

Alternatively, the zone can be stored in the environment variableCLOUDSDK_COMPUTE_ZONE.

Autoscaling policy for node groups.
--autoscaler-mode=AUTOSCALER_MODE
Set the mode of an autoscaler for a node group.AUTOSCALER_MODE must be one of:
off
to turn off autoscaling.
on
to permit autoscaling to scale in and out.
only-scale-out
to permit autoscaling to scale only out and not in.
This flag argument must be specified if any of the other arguments in this groupare specified.
--max-nodes=MAX_NODES
The maximum size of the node group. Must be smaller or equal to 100 and largerthan or equal to--min-nodes. Must be specified if--autoscaler-mode is notoff.
--min-nodes=MIN_NODES
The minimum size of the node group. Default is 0 and must be an integer valuesmaller than or equal to--max-nodes.
Manage the properties of a shared setting
--share-setting=SHARE_SETTING
Specify if this node group is shared; and if so, the type of sharing: share withspecific projects or folders.SHARE_SETTING must be oneof:projects,organization,local.

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

--share-with=PROJECT,[PROJECT,…]
A list of specific projects this node group should be shared with.
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. These variants are also available:
gcloudcomputesole-tenancynode-groupscreate
gcloudbetacomputesole-tenancynode-groupscreate

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-05-07 UTC.