node_pools
Creates, updates, deletes, gets or lists a node_pools
resource.
Overview
Name | node_pools |
Type | Resource |
Id | google.container.node_pools |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_clusters_node_pools_get
- projects_zones_clusters_node_pools_get
- projects_locations_clusters_node_pools_list
- projects_zones_clusters_node_pools_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The name of the node pool. |
autopilotConfig | object | Specifies the autopilot configuration for this node pool. This field is exclusively reserved for Cluster Autoscaler. (id: AutopilotConfig) |
autoscaling | object | Autoscaler configuration for this NodePool. Autoscaler is enabled only if a valid configuration is present. (id: NodePoolAutoscaling) |
bestEffortProvisioning | object | Enable best effort provisioning for nodes (id: BestEffortProvisioning) |
conditions | array | Which conditions caused the current node pool state. |
config | object | The node configuration of the pool. (id: NodeConfig) |
etag | string | This checksum is computed by the server based on the value of node pool fields, and may be sent on update requests to ensure the client has an up-to-date value before proceeding. |
initialNodeCount | integer (int32) | The initial node count for the pool. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. |
instanceGroupUrls | array | Output only. The resource URLs of the managed instance groups associated with this node pool. During the node pool blue-green upgrade operation, the URLs contain both blue and green resources. |
locations | array | The list of Google Compute Engine zones in which the NodePool's nodes should be located. If this value is unspecified during node pool creation, the Cluster.Locations value will be used, instead. Warning: changing node pool locations will result in nodes being added and/or removed. |
management | object | NodeManagement configuration for this NodePool. (id: NodeManagement) |
maxPodsConstraint | object | The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. (id: MaxPodsConstraint) |
networkConfig | object | Networking configuration for this NodePool. If specified, it overrides the cluster-level defaults. (id: NodeNetworkConfig) |
placementPolicy | object | Specifies the node placement policy. (id: PlacementPolicy) |
podIpv4CidrSize | integer (int32) | Output only. The pod CIDR block size per node in this node pool. |
queuedProvisioning | object | Specifies the configuration of queued provisioning. (id: QueuedProvisioning) |
selfLink | string | Output only. Server-defined URL for the resource. |
status | string | Output only. The status of the nodes in this pool instance. |
statusMessage | string | Output only. Deprecated. Use conditions instead. Additional information about the current status of this node pool instance, if available. |
updateInfo | object | Output only. Update info contains relevant information during a node pool update. (id: UpdateInfo) |
upgradeSettings | object | Upgrade settings control disruption and speed of the upgrade. (id: UpgradeSettings) |
version | string | The version of Kubernetes running on this NodePool's nodes. If unspecified, it defaults as described here. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The name of the node pool. |
autopilotConfig | object | Specifies the autopilot configuration for this node pool. This field is exclusively reserved for Cluster Autoscaler. (id: AutopilotConfig) |
autoscaling | object | Autoscaler configuration for this NodePool. Autoscaler is enabled only if a valid configuration is present. (id: NodePoolAutoscaling) |
bestEffortProvisioning | object | Enable best effort provisioning for nodes (id: BestEffortProvisioning) |
conditions | array | Which conditions caused the current node pool state. |
config | object | The node configuration of the pool. (id: NodeConfig) |
etag | string | This checksum is computed by the server based on the value of node pool fields, and may be sent on update requests to ensure the client has an up-to-date value before proceeding. |
initialNodeCount | integer (int32) | The initial node count for the pool. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. |
instanceGroupUrls | array | Output only. The resource URLs of the managed instance groups associated with this node pool. During the node pool blue-green upgrade operation, the URLs contain both blue and green resources. |
locations | array | The list of Google Compute Engine zones in which the NodePool's nodes should be located. If this value is unspecified during node pool creation, the Cluster.Locations value will be used, instead. Warning: changing node pool locations will result in nodes being added and/or removed. |
management | object | NodeManagement configuration for this NodePool. (id: NodeManagement) |
maxPodsConstraint | object | The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. (id: MaxPodsConstraint) |
networkConfig | object | Networking configuration for this NodePool. If specified, it overrides the cluster-level defaults. (id: NodeNetworkConfig) |
placementPolicy | object | Specifies the node placement policy. (id: PlacementPolicy) |
podIpv4CidrSize | integer (int32) | Output only. The pod CIDR block size per node in this node pool. |
queuedProvisioning | object | Specifies the configuration of queued provisioning. (id: QueuedProvisioning) |
selfLink | string | Output only. Server-defined URL for the resource. |
status | string | Output only. The status of the nodes in this pool instance. |
statusMessage | string | Output only. Deprecated. Use conditions instead. Additional information about the current status of this node pool instance, if available. |
updateInfo | object | Output only. Update info contains relevant information during a node pool update. (id: UpdateInfo) |
upgradeSettings | object | Upgrade settings control disruption and speed of the upgrade. (id: UpgradeSettings) |
version | string | The version of Kubernetes running on this NodePool's nodes. If unspecified, it defaults as described here. |
Successful response
Name | Datatype | Description |
---|---|---|
nodePools | array | A list of node pools for a cluster. |
Successful response
Name | Datatype | Description |
---|---|---|
nodePools | array | A list of node pools for a cluster. |
Methods
The following methods are available for this resource:
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
clusterId | string | |
clustersId | string | |
locationsId | string | |
nodePoolId | string | |
nodePoolsId | string | |
projectId | string | |
projectsId | string | |
zone | string | |
clusterId | string | |
name | string | |
nodePoolId | string | |
parent | string | |
projectId | string | |
zone | string |
SELECT
examples
- projects_locations_clusters_node_pools_get
- projects_zones_clusters_node_pools_get
- projects_locations_clusters_node_pools_list
- projects_zones_clusters_node_pools_list
Retrieves the requested node pool.
SELECT
name,
autopilotConfig,
autoscaling,
bestEffortProvisioning,
conditions,
config,
etag,
initialNodeCount,
instanceGroupUrls,
locations,
management,
maxPodsConstraint,
networkConfig,
placementPolicy,
podIpv4CidrSize,
queuedProvisioning,
selfLink,
status,
statusMessage,
updateInfo,
upgradeSettings,
version
FROM google.container.node_pools
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND clustersId = '{{ clustersId }}' -- required
AND nodePoolsId = '{{ nodePoolsId }}' -- required
AND projectId = '{{ projectId }}'
AND zone = '{{ zone }}'
AND clusterId = '{{ clusterId }}'
AND nodePoolId = '{{ nodePoolId }}';
Retrieves the requested node pool.
SELECT
name,
autopilotConfig,
autoscaling,
bestEffortProvisioning,
conditions,
config,
etag,
initialNodeCount,
instanceGroupUrls,
locations,
management,
maxPodsConstraint,
networkConfig,
placementPolicy,
podIpv4CidrSize,
queuedProvisioning,
selfLink,
status,
statusMessage,
updateInfo,
upgradeSettings,
version
FROM google.container.node_pools
WHERE projectId = '{{ projectId }}' -- required
AND zone = '{{ zone }}' -- required
AND clusterId = '{{ clusterId }}' -- required
AND nodePoolId = '{{ nodePoolId }}' -- required
AND name = '{{ name }}';
Lists the node pools for a cluster.
SELECT
nodePools
FROM google.container.node_pools
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND clustersId = '{{ clustersId }}' -- required
AND projectId = '{{ projectId }}'
AND zone = '{{ zone }}'
AND clusterId = '{{ clusterId }}';
Lists the node pools for a cluster.
SELECT
nodePools
FROM google.container.node_pools
WHERE projectId = '{{ projectId }}' -- required
AND zone = '{{ zone }}' -- required
AND clusterId = '{{ clusterId }}' -- required
AND parent = '{{ parent }}';
INSERT
examples
- projects_locations_clusters_node_pools_create
- projects_zones_clusters_node_pools_create
- Manifest
Creates a node pool for a cluster.
INSERT INTO google.container.node_pools (
data__projectId,
data__zone,
data__clusterId,
data__nodePool,
data__parent,
projectsId,
locationsId,
clustersId
)
SELECT
'{{ projectId }}',
'{{ zone }}',
'{{ clusterId }}',
'{{ nodePool }}',
'{{ parent }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ clustersId }}'
RETURNING
name,
clusterConditions,
detail,
endTime,
error,
location,
nodepoolConditions,
operationType,
progress,
selfLink,
startTime,
status,
statusMessage,
targetLink,
zone
;
Creates a node pool for a cluster.
INSERT INTO google.container.node_pools (
data__projectId,
data__zone,
data__clusterId,
data__nodePool,
data__parent,
projectId,
zone,
clusterId
)
SELECT
'{{ projectId }}',
'{{ zone }}',
'{{ clusterId }}',
'{{ nodePool }}',
'{{ parent }}',
'{{ projectId }}',
'{{ zone }}',
'{{ clusterId }}'
RETURNING
name,
clusterConditions,
detail,
endTime,
error,
location,
nodepoolConditions,
operationType,
progress,
selfLink,
startTime,
status,
statusMessage,
targetLink,
zone
;
# Description fields are for documentation purposes
- name: node_pools
props:
- name: projectsId
value: string
description: Required parameter for the node_pools resource.
- name: locationsId
value: string
description: Required parameter for the node_pools resource.
- name: clustersId
value: string
description: Required parameter for the node_pools resource.
- name: projectId
value: string
description: Required parameter for the node_pools resource.
- name: zone
value: string
description: Required parameter for the node_pools resource.
- name: clusterId
value: string
description: Required parameter for the node_pools resource.
- name: projectId
value: string
description: >
Deprecated. The Google Developers Console [project ID or project number](https://{$universe.dns_names.final_documentation_domain}/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the parent field.
- name: zone
value: string
description: >
Deprecated. The name of the Google Compute Engine [zone](https://{$universe.dns_names.final_documentation_domain}/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field.
- name: clusterId
value: string
description: >
Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field.
- name: nodePool
value: object
description: >
NodePool contains the name and configuration for a cluster's node pool. Node pools are a set of nodes (i.e. VM's), with a common configuration and specification, under the control of the cluster master. They may have a set of Kubernetes labels applied to them, which may be used to reference them during pod scheduling. They may also be resized up or down, to accommodate the workload.
- name: parent
value: string
description: >
The parent (project, location, cluster name) where the node pool will be created. Specified in the format `projects/*/locations/*/clusters/*`.
UPDATE
examples
- projects_zones_clusters_node_pools_update
Updates the version and/or image type for the specified node pool.
UPDATE google.container.node_pools
SET
data__projectId = '{{ projectId }}',
data__zone = '{{ zone }}',
data__clusterId = '{{ clusterId }}',
data__nodePoolId = '{{ nodePoolId }}',
data__nodeVersion = '{{ nodeVersion }}',
data__imageType = '{{ imageType }}',
data__name = '{{ name }}',
data__locations = '{{ locations }}',
data__workloadMetadataConfig = '{{ workloadMetadataConfig }}',
data__upgradeSettings = '{{ upgradeSettings }}',
data__tags = '{{ tags }}',
data__taints = '{{ taints }}',
data__labels = '{{ labels }}',
data__linuxNodeConfig = '{{ linuxNodeConfig }}',
data__kubeletConfig = '{{ kubeletConfig }}',
data__nodeNetworkConfig = '{{ nodeNetworkConfig }}',
data__gcfsConfig = '{{ gcfsConfig }}',
data__confidentialNodes = '{{ confidentialNodes }}',
data__gvnic = '{{ gvnic }}',
data__etag = '{{ etag }}',
data__fastSocket = '{{ fastSocket }}',
data__loggingConfig = '{{ loggingConfig }}',
data__resourceLabels = '{{ resourceLabels }}',
data__windowsNodeConfig = '{{ windowsNodeConfig }}',
data__accelerators = '{{ accelerators }}',
data__machineType = '{{ machineType }}',
data__diskType = '{{ diskType }}',
data__diskSizeGb = '{{ diskSizeGb }}',
data__resourceManagerTags = '{{ resourceManagerTags }}',
data__containerdConfig = '{{ containerdConfig }}',
data__queuedProvisioning = '{{ queuedProvisioning }}',
data__storagePools = '{{ storagePools }}',
data__maxRunDuration = '{{ maxRunDuration }}',
data__flexStart = {{ flexStart }},
data__bootDisk = '{{ bootDisk }}'
WHERE
projectId = '{{ projectId }}' --required
AND zone = '{{ zone }}' --required
AND clusterId = '{{ clusterId }}' --required
AND nodePoolId = '{{ nodePoolId }}' --required
RETURNING
name,
clusterConditions,
detail,
endTime,
error,
location,
nodepoolConditions,
operationType,
progress,
selfLink,
startTime,
status,
statusMessage,
targetLink,
zone;
REPLACE
examples
- projects_locations_clusters_node_pools_update
Updates the version and/or image type for the specified node pool.
REPLACE google.container.node_pools
SET
data__projectId = '{{ projectId }}',
data__zone = '{{ zone }}',
data__clusterId = '{{ clusterId }}',
data__nodePoolId = '{{ nodePoolId }}',
data__nodeVersion = '{{ nodeVersion }}',
data__imageType = '{{ imageType }}',
data__name = '{{ name }}',
data__locations = '{{ locations }}',
data__workloadMetadataConfig = '{{ workloadMetadataConfig }}',
data__upgradeSettings = '{{ upgradeSettings }}',
data__tags = '{{ tags }}',
data__taints = '{{ taints }}',
data__labels = '{{ labels }}',
data__linuxNodeConfig = '{{ linuxNodeConfig }}',
data__kubeletConfig = '{{ kubeletConfig }}',
data__nodeNetworkConfig = '{{ nodeNetworkConfig }}',
data__gcfsConfig = '{{ gcfsConfig }}',
data__confidentialNodes = '{{ confidentialNodes }}',
data__gvnic = '{{ gvnic }}',
data__etag = '{{ etag }}',
data__fastSocket = '{{ fastSocket }}',
data__loggingConfig = '{{ loggingConfig }}',
data__resourceLabels = '{{ resourceLabels }}',
data__windowsNodeConfig = '{{ windowsNodeConfig }}',
data__accelerators = '{{ accelerators }}',
data__machineType = '{{ machineType }}',
data__diskType = '{{ diskType }}',
data__diskSizeGb = '{{ diskSizeGb }}',
data__resourceManagerTags = '{{ resourceManagerTags }}',
data__containerdConfig = '{{ containerdConfig }}',
data__queuedProvisioning = '{{ queuedProvisioning }}',
data__storagePools = '{{ storagePools }}',
data__maxRunDuration = '{{ maxRunDuration }}',
data__flexStart = {{ flexStart }},
data__bootDisk = '{{ bootDisk }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND clustersId = '{{ clustersId }}' --required
AND nodePoolsId = '{{ nodePoolsId }}' --required
RETURNING
name,
clusterConditions,
detail,
endTime,
error,
location,
nodepoolConditions,
operationType,
progress,
selfLink,
startTime,
status,
statusMessage,
targetLink,
zone;
DELETE
examples
- projects_locations_clusters_node_pools_delete
- projects_zones_clusters_node_pools_delete
Deletes a node pool from a cluster.
DELETE FROM google.container.node_pools
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND clustersId = '{{ clustersId }}' --required
AND nodePoolsId = '{{ nodePoolsId }}' --required
AND projectId = '{{ projectId }}'
AND zone = '{{ zone }}'
AND clusterId = '{{ clusterId }}'
AND nodePoolId = '{{ nodePoolId }}';
Deletes a node pool from a cluster.
DELETE FROM google.container.node_pools
WHERE projectId = '{{ projectId }}' --required
AND zone = '{{ zone }}' --required
AND clusterId = '{{ clusterId }}' --required
AND nodePoolId = '{{ nodePoolId }}' --required
AND name = '{{ name }}';
Lifecycle Methods
- projects_locations_clusters_node_pools_set_autoscaling
- projects_locations_clusters_node_pools_complete_upgrade
- projects_locations_clusters_node_pools_rollback
- projects_locations_clusters_node_pools_set_management
- projects_locations_clusters_node_pools_set_size
- projects_zones_clusters_node_pools_autoscaling
- projects_zones_clusters_node_pools_rollback
- projects_zones_clusters_node_pools_set_management
- projects_zones_clusters_node_pools_set_size
Sets the autoscaling settings for the specified node pool.
EXEC google.container.node_pools.projects_locations_clusters_node_pools_set_autoscaling
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required,
@nodePoolsId='{{ nodePoolsId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"nodePoolId": "{{ nodePoolId }}",
"autoscaling": "{{ autoscaling }}",
"name": "{{ name }}"
}';
CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.
EXEC google.container.node_pools.projects_locations_clusters_node_pools_complete_upgrade
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required,
@nodePoolsId='{{ nodePoolsId }}' --required;
Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.
EXEC google.container.node_pools.projects_locations_clusters_node_pools_rollback
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required,
@nodePoolsId='{{ nodePoolsId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"nodePoolId": "{{ nodePoolId }}",
"name": "{{ name }}",
"respectPdb": {{ respectPdb }}
}';
Sets the NodeManagement options for a node pool.
EXEC google.container.node_pools.projects_locations_clusters_node_pools_set_management
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required,
@nodePoolsId='{{ nodePoolsId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"nodePoolId": "{{ nodePoolId }}",
"management": "{{ management }}",
"name": "{{ name }}"
}';
Sets the size for a specific node pool. The new size will be used for all replicas, including future replicas created by modifying NodePool.locations.
EXEC google.container.node_pools.projects_locations_clusters_node_pools_set_size
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required,
@nodePoolsId='{{ nodePoolsId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"nodePoolId": "{{ nodePoolId }}",
"nodeCount": {{ nodeCount }},
"name": "{{ name }}"
}';
Sets the autoscaling settings for the specified node pool.
EXEC google.container.node_pools.projects_zones_clusters_node_pools_autoscaling
@projectId='{{ projectId }}' --required,
@zone='{{ zone }}' --required,
@clusterId='{{ clusterId }}' --required,
@nodePoolId='{{ nodePoolId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"nodePoolId": "{{ nodePoolId }}",
"autoscaling": "{{ autoscaling }}",
"name": "{{ name }}"
}';
Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.
EXEC google.container.node_pools.projects_zones_clusters_node_pools_rollback
@projectId='{{ projectId }}' --required,
@zone='{{ zone }}' --required,
@clusterId='{{ clusterId }}' --required,
@nodePoolId='{{ nodePoolId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"nodePoolId": "{{ nodePoolId }}",
"name": "{{ name }}",
"respectPdb": {{ respectPdb }}
}';
Sets the NodeManagement options for a node pool.
EXEC google.container.node_pools.projects_zones_clusters_node_pools_set_management
@projectId='{{ projectId }}' --required,
@zone='{{ zone }}' --required,
@clusterId='{{ clusterId }}' --required,
@nodePoolId='{{ nodePoolId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"nodePoolId": "{{ nodePoolId }}",
"management": "{{ management }}",
"name": "{{ name }}"
}';
Sets the size for a specific node pool. The new size will be used for all replicas, including future replicas created by modifying NodePool.locations.
EXEC google.container.node_pools.projects_zones_clusters_node_pools_set_size
@projectId='{{ projectId }}' --required,
@zone='{{ zone }}' --required,
@clusterId='{{ clusterId }}' --required,
@nodePoolId='{{ nodePoolId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"nodePoolId": "{{ nodePoolId }}",
"nodeCount": {{ nodeCount }},
"name": "{{ name }}"
}';