projects

PUT /v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}

Changed on

Updates the version and/or image type for the specified node pool.

Request

  • Base URL
    https://container.googleapis.com
  • URL
    https://container.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}
  • Auth
    • OAuth 2 and OAuth 2
      Implicit: https://accounts.google.com/o/oauth2/auth
      Scopes: https://www.googleapis.com/auth/cloud-platform
      Authorization code: https://accounts.google.com/o/oauth2/auth
      Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/cloud-platform
    • or OAuth 2 and OAuth 2
      Implicit: https://accounts.google.com/o/oauth2/auth
      Scopes: https://www.googleapis.com/auth/container
      Authorization code: https://accounts.google.com/o/oauth2/auth
      Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/container

Path parameters

projectsIdstring required
locationsIdstring required
clustersIdstring required
nodePoolsIdstring required

Request body

clusterIdstring

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

consolidationDelaystring google-duration

Consolidation delay defines duration after which the Cluster Autoscaler can scale down underutilized nodes. If not set, nodes are scaled down by default behavior, i.e. according to the chosen autoscaling profile.

diskSizeGbstring int64

Optional. The desired disk size for nodes in the node pool specified in GB. The smallest allowed disk size is 10GB. Initiates an upgrade operation that migrates the nodes in the node pool to the specified disk size.

diskTypestring

Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or 'pd-balanced') for nodes in the node pool. Initiates an upgrade operation that migrates the nodes in the node pool to the specified disk type.

etagstring

The current etag of the node pool. If an etag is provided and does not match the current etag of the node pool, update will be blocked and an ABORTED error will be returned.

flexStartboolean

Flex Start flag for enabling Flex Start VM.

imagestring

The desired name of the image name to use for this node. This is used to create clusters using a custom image.

imageProjectstring

The project containing the desired image to use for this node pool. This is used to create clusters using a custom image.

imageTypestring

Required. The desired image type for the node pool. Please see https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for available image types.

locationsstring[]

The desired list of Google Compute Engine zones in which the node pool's nodes should be located. Changing the locations for a node pool will result in nodes being either created or removed from the node pool, depending on whether locations are being added or removed. Warning: It is recommended to update node pool locations in a standalone API call. Do not combine a location update with changes to other fields (such as tags, labels, taints, etc.) in the same request. Otherwise, the API performs a structural modification where changes to other fields will only apply to newly created nodes and will not be applied to existing nodes in the node pool. To ensure all nodes are updated consistently, use a separate API call for location changes.

machineTypestring

Optional. The desired Google Compute Engine machine type for nodes in the node pool. Initiates an upgrade operation that migrates the nodes in the node pool to the specified machine type.

maxRunDurationstring google-duration

The maximum duration for the nodes to exist. If unspecified, the nodes can exist indefinitely.

namestring

The name (project, location, cluster, node pool) of the node pool to update. Specified in the format projects/*/locations/*/clusters/*/nodePools/*.

nodeConfigUpdateMode'NODE_CONFIG_UPDATE_MODE_UNSPECIFIED' | 'LIVE_UPDATE_WITHOUT_DRAIN'

Optional. Option to specify the rollout strategy to apply node pool configuration updates. If unspecified, standard rolling update strategy with VM recreation is used as the default behavior.

nodePoolIdstring

Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field.

nodeVersionstring

Required. The Kubernetes version to change the nodes to (typically an upgrade). Users may specify either explicit versions offered by Kubernetes Engine or version aliases, which have the following behavior: - "latest": picks the highest valid Kubernetes version - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - "1.X.Y-gke.N": picks an explicit Kubernetes version - "-": picks the Kubernetes master version

projectIdstring

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

storagePoolsstring[]

List of Storage Pools where boot disks are provisioned. Existing Storage Pools will be replaced with storage-pools.

zonestring

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

Response

Successful response

detailstring

Output only. Detailed operation progress, if available.

endTimestring

Output only. The time the operation completed, in RFC3339 text format.

locationstring

Output only. The name of the Google Compute Engine zone or region in which the cluster resides.

namestring

Output only. The server-assigned ID for the operation.

operationType'TYPE_UNSPECIFIED' | 'CREATE_CLUSTER' | 'DELETE_CLUSTER' | 'UPGRADE_MASTER' | 'UPGRADE_NODES' | 'REPAIR_CLUSTER' | 'UPDATE_CLUSTER' | 'CREATE_NODE_POOL' | 'DELETE_NODE_POOL' | 'SET_NODE_POOL_MANAGEMENT' | 'AUTO_REPAIR_NODES' | 'AUTO_UPGRADE_NODES' | 'SET_LABELS' | 'SET_MASTER_AUTH' | 'SET_NODE_POOL_SIZE' | 'SET_NETWORK_POLICY' | 'SET_MAINTENANCE_POLICY' | 'RESIZE_CLUSTER' | 'FLEET_FEATURE_UPGRADE'

Output only. The operation type.

selfLinkstring

Output only. Server-defined URI for the operation. Example: https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123.

startTimestring

Output only. The time the operation started, in RFC3339 text format.

status'STATUS_UNSPECIFIED' | 'PENDING' | 'RUNNING' | 'DONE' | 'ABORTING'

Output only. The current status of the operation.

statusMessagestring

Output only. If an error has occurred, a textual description of the error. Deprecated. Use the field error instead.

targetLinkstring

Output only. Server-defined URI for the target of the operation. The format of this is a URI to the resource being modified (such as a cluster, node pool, or node). For node pool repairs, there may be multiple nodes being repaired, but only one will be the target. Examples: - ## https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster ## https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node

zonestring

Output only. The name of the Google Compute Engine zone in which the operation is taking place. This field is deprecated, use location instead.

Changes

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/container was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/container was removed from the endpoint's security scheme Oauth2c