This document describes how to create and delete sole-tenant node groups. If you
haven't created a sole-tenant node template yet, you must do so before you can create a node group.
Node groups are zonal resources that inherit properties from the node template
they are based on. When you create a node group, you must specify configuration
such as the number of nodes and maintenance settings.
Permissions required for this task
To perform this task, you must have the following
permissions :
compute.nodeTemplates.use on the node template
compute.nodeGroups.create on the project or organization
To create a sole-tenant node group, use one of the following methods:
Console
In the Google Cloud console, go to the Sole-tenant nodes page.
Go to Sole-tenant nodes
Click Create node group to begin creating a node group.
Specify a Name for the node group.
Specify the Region for the node group to display the available node
templates in that region.
Specify the Zone within the region to create the node group in.
Specify the Node template to create the node group or click
Create node template to create a new sole-tenant node template . The selected node template is applied to the node group.
Choose one of the following for the Autoscaling mode for the node group autoscaler :
Off : Manually manage the size of the node
group.
On : Have nodes automatically added to or removed from the
node group.
Only scale out : Add nodes to the node group when extra
capacity is required.
Specify the Number of nodes for the group. If you enable the node group autoscaler , specify a
range for the size of the node group. You can manually change the values
later.
Set the Maintenance policy of the sole-tenant node group in the
Configure Maintenance Settings section to one of the following values.
The maintenance policy lets you configure the behavior of VMs on the node
group during host maintenance events. For more information, see Maintenance policies :
Default
Restart in place
Migrate within node group
You can choose between regular maintenance windows and
advanced maintenance control to handle maintenance for your sole-tenant
node group, as follows:
Maintenance Window: Select the time period during which you want
planned maintenance events to happen for the nodes in the sole-tenant
node groups.
Opt-in for advanced maintenance control for sole-tenancy:
Advanced maintenance control for sole-tenancy lets you control
planned maintenance events for sole-tenant node groups and minimize
maintenance-related disruptions. To opt-in for advanced maintenance
control, click the Opt-in for advanced maintenance control for sole-tenancy
toggle to the on position. If you choose to use this option for node
maintenance, the Maintenance window field is disabled, and
maintenance occurs as configured in advanced maintenance control.
Note that advanced maintenance control only supports the Default
maintenance policy.
Configure the share settings by specifying one of the following in
Configure share settings :
To share the node group with all projects in your organization, choose
Share this node group with all projects within the organization .
To share the node group with specific projects within your
organization, choose Share this node group with selected projects
within the organization .
If you don't want to share the node group, choose Do not share this node group with other projects . For more information about sharing node
groups, see Share sole-tenant node groups .
Click Create to finish creating the node group.
gcloud Run the gcloud compute sole-tenancy node-groups create command command to create a node group based on a previously created node template:
gcloud compute sole-tenancy node-groups create GROUP_NAME \
--node-template=TEMPLATE_NAME \
--target-size=TARGET_SIZE \
[--zone=ZONE \]
[--maintenance-policy=MAINTENANCE_POLICY \]
[--maintenance-window-start-time=START_TIME \]
[--autoscaler-mode=AUTOSCALER_MODE \
--min-nodes=MIN_NODES \
--max-nodes=MAX_NODES ]
Replace the following:
GROUP_NAME : the name for the new node group.
TEMPLATE_NAME : the name of the node template to
use to create this group.
TARGET_SIZE : the number of nodes to create in the
group.
ZONE : the zone to create the node group in. This must
be the same region as the node template on which you are basing the node
group.
MAINTENANCE_POLICY : the maintenance policy for the
node group. For more information, see Maintenance policies . This must be one of the following values:
default
restart-in-place
migrate-within-node-group
Alternately, you can opt in for advanced maintenance control for the
sole-tenant node group, using the --maintenance-interval flag.
For more information, see Enable advanced maintenance control on a sole-tenant node .
START_TIME : the start time in GMT for the
maintenance window for the VMs in this node group. Set to one of: 00:00,
04:00, 08:00, 12:00, 16:00, or 20:00. If not set, the node
group does not have a set maintenance window.
AUTOSCALER_MODE : the autoscaler policy for the node
group. This must be one of:
off: manually manage the size of the node group.
on: have nodes automatically added to or removed from the
node group.
only-scale-out: add nodes to the node group when extra
capacity is required.
MIN_NODES : the minimim size of the node group. The
default value is 0 and must be an integer value less than or equal to
MAX_NODES.
MAX_NODES : the maximum size of the node group.
This must be less than or equal to 100 and greater than or equal to
MIN_NODES. Required if AUTOSCALER_MODE is not set
to off.
REST Use the
nodeGroups.insert method
to create a node group based on a previously created node
template:
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID /zones/ZONE /nodeGroups?initialNodeCount=TARGET_SIZE
{
"nodeTemplate": "regions/REGION /nodeTemplates/TEMPLATE_NAME ",
"name": "GROUP_NAME ",
"maintenancePolicy": MAINTENANCE_POLICY ,
"maintenanceWindow": {
"startTime": "START_TIME "
},
"autoscalingPolicy": {
"mode": AUTOSCALER_MODE ,
"minNodes": MIN_NODES ,
"maxNodes": MAX_NODES
},
}
Replace the following:
PROJECT_ID : the project ID.
ZONE : the zone to create the node group in. This
must be in the same region as the node template on which you are basing the
node group.
TARGET_SIZE : the number of nodes to create in the
group.
REGION : the region to create the node group in.
You must have a node template in the selected region.
TEMPLATE_NAME : the name of the node template to
use to create this group.
GROUP_NAME : the name for the new node group.
MAINTENANCE_POLICY : the maintenance policy for the node group. This must be one of the following values:
DEFAULT
RESTART_IN_PLACE
MIGRATE_WITHIN_NODE_GROUP
Alternately, you can opt-in for advanced maintenance control for the
sole-tenant node group, using the maintenanceInterval field.
For more information, see Enable advanced maintenance control on a sole-tenant node .
START_TIME : the start time in GMT for the
maintenance window for the VMs in this node group. Set to one of: 00:00,
04:00, 08:00, 12:00, 16:00, or 20:00. If not set, the node
group does not have a set maintenance window.
AUTOSCALER_MODE : the autoscaler policy for the node
group. This must be one of the following values:
OFF: manually manage the size of the node group.
ON: have nodes automatically added to or removed from the
node group.
ONLY_SCALE_OUT: add nodes to the node group when extra
capacity is required.
MIN_NODES : the minimim size of the node group. The default
is 0 and must be an integer value less than or equal to
MAX_NODES.
MAX_NODES : the maximum size of the node group.
This must be less than or equal to 100 and greater than or equal to
MIN_NODES. Required if AUTOSCALER_MODE is not set
to OFF.
Delete a node group
If you need to delete a sole-tenant node group, first remove any VMs from the
node group.
REST
List running VM instances on nodes in the node group by using the
nodeGroups.listNodes method :
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID /zones/ZONE /nodeGroups/GROUP_NAME /listNodes
Replace the following:
PROJECT_ID : the project ID
ZONE : the zone of the node group
GROUP_NAME : the group for which to list the VMs
If there are any VMs running on the node group, follow the procedure to delete an individual VM or the
procedure to delete a managed instance group .
After deleting all VMs running on all nodes of the node group, delete the
node group by using the nodeGroups.delete method :
DELETE https://compute.googleapis.com/compute/v1/projects/PROJECT_ID /zones/ZONE /nodeGroups/GROUP_NAME
Replace the following:
PROJECT_ID : the project ID
ZONE : the zone of the node group
GROUP_NAME : the name of the node group to delete
What's next
Send feedback
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-09 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-06-09 UTC."],[],[]]