---
title: "POST /projects/{project}/zones/{zone}/nodeGroups"
method: POST
path: "/projects/{project}/zones/{zone}/nodeGroups"
tags: ["nodeGroups"]
---

# POST /projects/{project}/zones/{zone}/nodeGroups

`POST /projects/{project}/zones/{zone}/nodeGroups`

Creates a NodeGroup resource in the specified project using the data
included in the request.

## Path parameters

- `project` string, required
- `zone` string, required

## Query parameters

- `initialNodeCount` integer, required
- `requestId` string

## Request body

- NodeGroup — Represents a sole-tenant Node Group resource. A sole-tenant node is a physical server that is dedicated to hosting VM instances only for your specific project. Use sole-tenant nodes to keep your instances physically separated from instances in other projects, or to group your instances together on the same host hardware. For more information, readSole-tenant nodes.
  - `creationTimestamp` string — Output only. [Output Only] Creation timestamp inRFC3339 text format.
  - `locationHint` string — An opaque location hint used to place the Node close to other resources. This field is for use by internal tools that use the public API. The location hint here on the NodeGroup overrides any location_hint present in the NodeTemplate.
  - `description` string — An optional description of this resource. Provide this property when you create the resource.
  - `fingerprint` string, byte
  - `maintenanceWindow` NodeGroupMaintenanceWindow — Time window specified for daily maintenance operations. GCE's internal maintenance will be performed within this window.
    - `startTime` string — Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00,12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
    - `maintenanceDuration` Duration — A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years.
      - `nanos` integer — Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
      - `seconds` string, int64 — Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
  - `name` string — The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
  - `size` integer — Output only. [Output Only] The total number of nodes in the node group.
  - `kind` string — Output only. [Output Only] The type of the resource. Alwayscompute#nodeGroup for node group.
  - `shareSettings` ShareSettings — The share setting for reservations and sole tenancy node groups.
    - `shareType` 'LOCAL' | 'ORGANIZATION' | 'SHARE_TYPE_UNSPECIFIED' | 'SPECIFIC_PROJECTS' — Type of sharing for this shared-reservation
    - `projectMap` object — A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS.
  - `id` string, uint64 — Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
  - `autoscalingPolicy` NodeGroupAutoscalingPolicy
    - `maxNodes` integer — The maximum number of nodes that the group should have. Must be set if autoscaling is enabled. Maximum value allowed is 100.
    - `mode` 'MODE_UNSPECIFIED' | 'OFF' | 'ON' | 'ONLY_SCALE_OUT' — The autoscaling mode. Set to one of: ON, OFF, or ONLY_SCALE_OUT. For more information, see Autoscaler modes.
    - `minNodes` integer — The minimum number of nodes that the group should have.
  - `maintenancePolicy` 'DEFAULT' | 'MAINTENANCE_POLICY_UNSPECIFIED' | 'MIGRATE_WITHIN_NODE_GROUP' | 'RESTART_IN_PLACE' — Specifies how to handle instances when a node in the group undergoes maintenance. Set to one of: DEFAULT,RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default value is DEFAULT. For more information, see Maintenance policies.
  - `status` 'CREATING' | 'DELETING' | 'INVALID' | 'READY'
  - `nodeTemplate` string — URL of the node template to create the node group from.
  - `selfLink` string — Output only. [Output Only] Server-defined URL for the resource.
  - `maintenanceInterval` 'AS_NEEDED' | 'RECURRENT' — Specifies the frequency of planned maintenance events. The accepted values are: `AS_NEEDED` and `RECURRENT`.
  - `zone` string — Output only. [Output Only] The name of the zone where the node group resides, such as us-central1-a.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/compute.md) · [All operations](https://skmtc.net/google/apis/compute/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/compute/versions/6120ed8969d4/schema)
