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

NameDatatypeDescription
namestringThe name of the node pool.
autoscalingobjectNodePoolAutoscaling contains information required by cluster autoscaler to adjust the size of the node pool to the current cluster usage.
bestEffortProvisioningobjectBest effort provisioning.
conditionsarrayWhich conditions caused the current node pool state.
configobjectParameters that describe the nodes in a cluster. GKE Autopilot clusters do not recognize parameters in NodeConfig. Use AutoprovisioningNodePoolDefaults instead.
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.
initialNodeCountintegerThe 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 defines the set of node management services turned on for the node pool.
maxPodsConstraintobjectConstraints applied to pods.
networkConfigobjectParameters for node pool-level network config.
placementPolicyobjectPlacementPolicy defines the placement policy used by the node pool.
podIpv4CidrSizeintegerOutput only. The pod CIDR block size per node in this node pool.
queuedProvisioningobjectQueuedProvisioning defines the queued provisioning used by the node pool.
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.
updateInfoobjectUpdateInfo contains resource (instance groups, etc), status and other intermediate information relevant to a node pool upgrade.
upgradeSettingsobjectThese upgrade settings control the level of parallelism and the level of disruption caused by an upgrade. maxUnavailable controls the number of nodes that can be simultaneously unavailable. maxSurge controls the number of additional nodes that can be added to the node pool temporarily for the time of the upgrade to increase the number of available nodes. (maxUnavailable + maxSurge) determines the level of parallelism (how many nodes are being upgraded at the same time). Note: upgrades inevitably introduce some disruption since workloads need to be moved from old nodes to new, upgraded ones. Even if maxUnavailable=0, this holds true. (Disruption stays within the limits of PodDisruptionBudget, if it is configured.) Consider a hypothetical node pool with 5 nodes having maxSurge=2, maxUnavailable=1. This means the upgrade process upgrades 3 nodes simultaneously. It creates 2 additional (upgraded) nodes, then it brings down 3 old (not yet upgraded) nodes at the same time. This ensures that there are always at least 4 nodes available. These upgrade settings configure the upgrade strategy for the node pool. Use strategy to switch between the strategies applied to the node pool. If the strategy is ROLLING, use max_surge and max_unavailable to control the level of parallelism and the level of disruption caused by upgrade. 1. maxSurge controls the number of additional nodes that can be added to the node pool temporarily for the time of the upgrade to increase the number of available nodes. 2. maxUnavailable controls the number of nodes that can be simultaneously unavailable. 3. (maxUnavailable + maxSurge) determines the level of parallelism (how many nodes are being upgraded at the same time). If the strategy is BLUE_GREEN, use blue_green_settings to configure the blue-green upgrade related settings. 1. standard_rollout_policy is the default policy. The policy is used to control the way blue pool gets drained. The draining is executed in the batch mode. The batch size could be specified as either percentage of the node pool size or the number of nodes. batch_soak_duration is the soak time after each batch gets drained. 2. node_pool_soak_duration is the soak time after all blue nodes are drained. After this period, the blue pool nodes will be deleted.
versionstringThe version of Kubernetes running on this NodePool's nodes. If unspecified, it defaults as described here.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_clusters_node_pools_getSELECTclustersId, locationsId, nodePoolsId, projectsIdRetrieves the requested node pool.
projects_locations_clusters_node_pools_listSELECTclustersId, locationsId, projectsIdLists the node pools for a cluster.
projects_zones_clusters_node_pools_getSELECTclusterId, nodePoolId, projectId, zoneRetrieves the requested node pool.
projects_zones_clusters_node_pools_listSELECTclusterId, projectId, zoneLists the node pools for a cluster.
projects_locations_clusters_node_pools_createINSERTclustersId, locationsId, projectsIdCreates a node pool for a cluster.
projects_zones_clusters_node_pools_createINSERTclusterId, projectId, zoneCreates a node pool for a cluster.
projects_locations_clusters_node_pools_deleteDELETEclustersId, locationsId, nodePoolsId, projectsIdDeletes a node pool from a cluster.
projects_zones_clusters_node_pools_deleteDELETEclusterId, nodePoolId, projectId, zoneDeletes a node pool from a cluster.
projects_zones_clusters_node_pools_updateUPDATEclusterId, nodePoolId, projectId, zoneUpdates the version and/or image type for the specified node pool.
projects_locations_clusters_node_pools_updateREPLACEclustersId, locationsId, nodePoolsId, projectsIdUpdates the version and/or image type for the specified node pool.
projects_locations_clusters_node_pools_complete_upgradeEXECclustersId, locationsId, nodePoolsId, projectsIdCompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.
projects_locations_clusters_node_pools_rollbackEXECclustersId, locationsId, nodePoolsId, projectsIdRolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.
projects_locations_clusters_node_pools_set_autoscalingEXECclustersId, locationsId, nodePoolsId, projectsIdSets the autoscaling settings for the specified node pool.
projects_locations_clusters_node_pools_set_managementEXECclustersId, locationsId, nodePoolsId, projectsIdSets the NodeManagement options for a node pool.
projects_locations_clusters_node_pools_set_sizeEXECclustersId, locationsId, nodePoolsId, projectsIdSets 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_autoscalingEXECclusterId, nodePoolId, projectId, zoneSets the autoscaling settings for the specified node pool.
projects_zones_clusters_node_pools_rollbackEXECclusterId, nodePoolId, projectId, zoneRolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.
projects_zones_clusters_node_pools_set_managementEXECclusterId, nodePoolId, projectId, zoneSets the NodeManagement options for a node pool.
projects_zones_clusters_node_pools_set_sizeEXECclusterId, nodePoolId, projectId, zoneSets the size for a specific node pool. The new size will be used for all replicas, including future replicas created by modifying NodePool.locations.

SELECT examples

Lists the node pools for a cluster.

SELECT
name,
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 clusterId = '{{ clusterId }}'
AND projectId = '{{ projectId }}'
AND zone = '{{ zone }}';

INSERT example

Use the following StackQL query and manifest file to create a new node_pools resource.

/*+ create */
INSERT INTO google.container.node_pools (
clusterId,
projectId,
zone,
projectId,
zone,
clusterId,
nodePool,
parent
)
SELECT
'{{ clusterId }}',
'{{ projectId }}',
'{{ zone }}',
'{{ projectId }}',
'{{ zone }}',
'{{ clusterId }}',
'{{ nodePool }}',
'{{ parent }}'
;

UPDATE example

Updates a node_pools resource.

/*+ update */
UPDATE google.container.node_pools
SET
projectId = '{{ projectId }}',
zone = '{{ zone }}',
clusterId = '{{ clusterId }}',
nodePoolId = '{{ nodePoolId }}',
nodeVersion = '{{ nodeVersion }}',
imageType = '{{ imageType }}',
name = '{{ name }}',
locations = '{{ locations }}',
workloadMetadataConfig = '{{ workloadMetadataConfig }}',
upgradeSettings = '{{ upgradeSettings }}',
tags = '{{ tags }}',
taints = '{{ taints }}',
labels = '{{ labels }}',
linuxNodeConfig = '{{ linuxNodeConfig }}',
kubeletConfig = '{{ kubeletConfig }}',
nodeNetworkConfig = '{{ nodeNetworkConfig }}',
gcfsConfig = '{{ gcfsConfig }}',
confidentialNodes = '{{ confidentialNodes }}',
gvnic = '{{ gvnic }}',
etag = '{{ etag }}',
fastSocket = '{{ fastSocket }}',
loggingConfig = '{{ loggingConfig }}',
resourceLabels = '{{ resourceLabels }}',
windowsNodeConfig = '{{ windowsNodeConfig }}',
accelerators = '{{ accelerators }}',
machineType = '{{ machineType }}',
diskType = '{{ diskType }}',
diskSizeGb = '{{ diskSizeGb }}',
resourceManagerTags = '{{ resourceManagerTags }}',
containerdConfig = '{{ containerdConfig }}',
queuedProvisioning = '{{ queuedProvisioning }}',
storagePools = '{{ storagePools }}'
WHERE
clusterId = '{{ clusterId }}'
AND nodePoolId = '{{ nodePoolId }}'
AND projectId = '{{ projectId }}'
AND zone = '{{ zone }}';

REPLACE example

Replaces all fields in the specified node_pools resource.

/*+ update */
REPLACE google.container.node_pools
SET
projectId = '{{ projectId }}',
zone = '{{ zone }}',
clusterId = '{{ clusterId }}',
nodePoolId = '{{ nodePoolId }}',
nodeVersion = '{{ nodeVersion }}',
imageType = '{{ imageType }}',
name = '{{ name }}',
locations = '{{ locations }}',
workloadMetadataConfig = '{{ workloadMetadataConfig }}',
upgradeSettings = '{{ upgradeSettings }}',
tags = '{{ tags }}',
taints = '{{ taints }}',
labels = '{{ labels }}',
linuxNodeConfig = '{{ linuxNodeConfig }}',
kubeletConfig = '{{ kubeletConfig }}',
nodeNetworkConfig = '{{ nodeNetworkConfig }}',
gcfsConfig = '{{ gcfsConfig }}',
confidentialNodes = '{{ confidentialNodes }}',
gvnic = '{{ gvnic }}',
etag = '{{ etag }}',
fastSocket = '{{ fastSocket }}',
loggingConfig = '{{ loggingConfig }}',
resourceLabels = '{{ resourceLabels }}',
windowsNodeConfig = '{{ windowsNodeConfig }}',
accelerators = '{{ accelerators }}',
machineType = '{{ machineType }}',
diskType = '{{ diskType }}',
diskSizeGb = '{{ diskSizeGb }}',
resourceManagerTags = '{{ resourceManagerTags }}',
containerdConfig = '{{ containerdConfig }}',
queuedProvisioning = '{{ queuedProvisioning }}',
storagePools = '{{ storagePools }}'
WHERE
clustersId = '{{ clustersId }}'
AND locationsId = '{{ locationsId }}'
AND nodePoolsId = '{{ nodePoolsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified node_pools resource.

/*+ delete */
DELETE FROM google.container.node_pools
WHERE clusterId = '{{ clusterId }}'
AND nodePoolId = '{{ nodePoolId }}'
AND projectId = '{{ projectId }}'
AND zone = '{{ zone }}';