[ Web Proxy ]
URL:
Viewing: https://cloud.google.com/compute/docs/nodes/sole-tenancy-node-templates [Back]  [Original]

Create sole-tenant node templates  |  Compute Engine  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback

Create sole-tenant node templates Stay organized with collections Save and categorize content based on your preferences.

This document describes how to create and delete sole-tenant node templates. Before creating sole-tenant node templates, review the sole-tenant node overview to learn about important concepts and terminology.

Sole-tenant node templates are regional resources that specify properties for sole-tenant node groups. You must create a node template before you create a node group.

Create a sole-tenant node template

Permissions required for this task

To perform this task, you must have the following permissions:

If you use the gcloud CLI or REST, you can create a node template resource that you can use later to create one or more node groups. If you use the Google Cloud console, you must create node templates when you create a node group.

To create a sole-tenant node template, use one of the following methods:

Console

  1. In the Google Cloud console, go to the Sole-tenant nodes page.

    Go to Sole-tenant nodes

  2. Click Create node group. The process of creating a node group in the console includes creating or selecting a node template.

  3. Specify a Name for the node group.

  4. Specify a Region to create the node template in. You can use the node template to create node groups in any zone of this region.

  5. Specify the Zone and click Continue.

  6. In the Node template list, click Create node template to begin creating a sole-tenant node template.

  7. Specify a Name for the node template.

  8. Specify the Node type for each sole-tenant node in the node group to create based on this node template.

  9. Optionally, you can also specify the following properties for the node template:

    • Add a Local SSD and GPU accelerator.
    • Select Enable CPU overcommit to control CPU overcommit levels for each VM scheduled on the node.
    • Add Node affinity labels. Affinity labels let you logically group nodes and node groups, and later, when provisioning VMs, you can specify affinity labels on the VMs to schedule VMs on a specific set of nodes or node groups. For more information, see Node affinity and anti-affinity.
  10. Click Create to finish creating your node template.

  11. Optional: to add a new sole-tenant node template in a different region, repeat the preceding steps.

To view the node templates, click Node templates in the Sole-tenant nodes page.

gcloud

Use the gcloud compute sole-tenancy node-templates create command to create a node template:

gcloud compute sole-tenancy node-templates create TEMPLATE_NAME \
  --node-type=NODE_TYPE \
  [--region=REGION \]
  [--node-affinity-labels=AFFINITY_LABELS \]
  [--accelerator type=GPU_TYPE,count=GPU_COUNT \]
  [--disk type=local-ssd,count=DISK_COUNT,size=DISK_SIZE \]
  [--cpu-overcommit-type=CPU_OVERCOMMIT_TYPE]

Replace the following:

REST

Use the nodeTemplates.insert method to create a node template:

POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/nodeTemplates

{
  "name": "TEMPLATE_NAME",
  "nodeType": "NODE_TYPE",
  "nodeAffinityLabels": {
    "KEY": "VALUE",
    ...
  },
  "accelerators": [
    {
      "acceleratorType": "GPU_TYPE",
      "acceleratorCount": GPU_COUNT
    }
  ],
  "disks": [
    {
      "diskType": "local-ssd",
      "diskSizeGb": DISK_SIZE,
      "diskCount": DISK_COUNT
    }
  ],
  "cpuOvercommitType": CPU_OVERCOMMIT_TYPE
}

Replace the following:

Delete a node template

You can delete a node template after you've deleted all of the node groups that are using the template.

Console

  1. In the Google Cloud console, go to the Sole-tenant nodes page.

    Go to Sole-tenant nodes

  2. Click Node templates.

  3. Select the name of an unused node template.

  4. Click Delete.

gcloud

Use the gcloud compute sole-tenancy node-templates delete command to delete an unused node template:

gcloud compute sole-tenancy node-templates delete TEMPLATE_NAME \
  --region=REGION

Replace the following:

REST

Use the compute.nodeTemplates.delete method to delete an unused node template:

 DELETE https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/nodeTemplates/TEMPLATE_NAME
 

Replace the following:

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-08-11 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-08-11 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page