Skip to main content

node_pools

Creates, updates, deletes, gets or lists a node_pools resource.

Overview

Namenode_pools
TypeResource
Idgoogle.container.node_pools

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringThe name of the node pool.
autopilotConfigobjectSpecifies the autopilot configuration for this node pool. This field is exclusively reserved for Cluster Autoscaler. (id: AutopilotConfig)
autoscalingobjectAutoscaler configuration for this NodePool. Autoscaler is enabled only if a valid configuration is present. (id: NodePoolAutoscaling)
bestEffortProvisioningobjectEnable best effort provisioning for nodes (id: BestEffortProvisioning)
conditionsarrayWhich conditions caused the current node pool state.
configobjectThe node configuration of the pool. (id: NodeConfig)
etagstringThis 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.
initialNodeCountinteger (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.
instanceGroupUrlsarrayOutput 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.
locationsarrayThe 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.
managementobjectNodeManagement configuration for this NodePool. (id: NodeManagement)
maxPodsConstraintobjectThe constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. (id: MaxPodsConstraint)
networkConfigobjectNetworking configuration for this NodePool. If specified, it overrides the cluster-level defaults. (id: NodeNetworkConfig)
placementPolicyobjectSpecifies the node placement policy. (id: PlacementPolicy)
podIpv4CidrSizeinteger (int32)Output only. The pod CIDR block size per node in this node pool.
queuedProvisioningobjectSpecifies the configuration of queued provisioning. (id: QueuedProvisioning)
selfLinkstringOutput only. Server-defined URL for the resource.
statusstringOutput only. The status of the nodes in this pool instance.
statusMessagestringOutput only. Deprecated. Use conditions instead. Additional information about the current status of this node pool instance, if available.
updateInfoobjectOutput only. Update info contains relevant information during a node pool update. (id: UpdateInfo)
upgradeSettingsobjectUpgrade settings control disruption and speed of the upgrade. (id: UpgradeSettings)
versionstringThe version of Kubernetes running on this NodePool's nodes. If unspecified, it defaults as described here.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_clusters_node_pools_getselectprojectsId, locationsId, clustersId, nodePoolsIdprojectId, zone, clusterId, nodePoolIdRetrieves the requested node pool.
projects_zones_clusters_node_pools_getselectprojectId, zone, clusterId, nodePoolIdnameRetrieves the requested node pool.
projects_locations_clusters_node_pools_listselectprojectsId, locationsId, clustersIdprojectId, zone, clusterIdLists the node pools for a cluster.
projects_zones_clusters_node_pools_listselectprojectId, zone, clusterIdparentLists the node pools for a cluster.
projects_locations_clusters_node_pools_createinsertprojectsId, locationsId, clustersIdCreates a node pool for a cluster.
projects_zones_clusters_node_pools_createinsertprojectId, zone, clusterIdCreates a node pool for a cluster.
projects_zones_clusters_node_pools_updateupdateprojectId, zone, clusterId, nodePoolIdUpdates the version and/or image type for the specified node pool.
projects_locations_clusters_node_pools_updatereplaceprojectsId, locationsId, clustersId, nodePoolsIdUpdates the version and/or image type for the specified node pool.
projects_locations_clusters_node_pools_deletedeleteprojectsId, locationsId, clustersId, nodePoolsIdprojectId, zone, clusterId, nodePoolIdDeletes a node pool from a cluster.
projects_zones_clusters_node_pools_deletedeleteprojectId, zone, clusterId, nodePoolIdnameDeletes a node pool from a cluster.
projects_locations_clusters_node_pools_set_autoscalingexecprojectsId, locationsId, clustersId, nodePoolsIdSets the autoscaling settings for the specified node pool.
projects_locations_clusters_node_pools_complete_upgradeexecprojectsId, locationsId, clustersId, nodePoolsIdCompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.
projects_locations_clusters_node_pools_rollbackexecprojectsId, locationsId, clustersId, nodePoolsIdRolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.
projects_locations_clusters_node_pools_set_managementexecprojectsId, locationsId, clustersId, nodePoolsIdSets the NodeManagement options for a node pool.
projects_locations_clusters_node_pools_set_sizeexecprojectsId, locationsId, clustersId, nodePoolsIdSets the size for a specific node pool. The new size will be used for all replicas, including future replicas created by modifying NodePool.locations.
projects_zones_clusters_node_pools_autoscalingexecprojectId, zone, clusterId, nodePoolIdSets the autoscaling settings for the specified node pool.
projects_zones_clusters_node_pools_rollbackexecprojectId, zone, clusterId, nodePoolIdRolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.
projects_zones_clusters_node_pools_set_managementexecprojectId, zone, clusterId, nodePoolIdSets the NodeManagement options for a node pool.
projects_zones_clusters_node_pools_set_sizeexecprojectId, zone, clusterId, nodePoolIdSets the size for a specific node pool. The new size will be used for all replicas, including future replicas created by modifying NodePool.locations.

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.

NameDatatypeDescription
clusterIdstring
clustersIdstring
locationsIdstring
nodePoolIdstring
nodePoolsIdstring
projectIdstring
projectsIdstring
zonestring
clusterIdstring
namestring
nodePoolIdstring
parentstring
projectIdstring
zonestring

SELECT examples

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 }}';

INSERT examples

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
;

UPDATE examples

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

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

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 }}';

Lifecycle Methods

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 }}"
}';