Method: projects.zones.clusters.update

Updates the settings of a specific cluster.

HTTP request

PUT https://container.googleapis.com/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
projectId

string

The Google Developers Console project ID or project number.

zone

string

The name of the Google Compute Engine zone in which the cluster resides.

clusterId

string

The name of the cluster to upgrade.

Request body

The request body contains data with the following structure:

JSON representation
{
  "update": {
    object(ClusterUpdate)
  },
}
Fields
update

object(ClusterUpdate)

A description of the update.

Response body

If successful, the response body contains an instance of Operation.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Auth Guide.

ClusterUpdate

ClusterUpdate describes an update to the cluster. Exactly one update can be applied to a cluster with each request, so at most one field can be provided.

JSON representation
{
  "desiredNodeVersion": string,
  "desiredMonitoringService": string,
  "desiredAddonsConfig": {
    object(AddonsConfig)
  },
  "desiredNodePoolId": string,
  "desiredImageType": string,
  "desiredNodePoolAutoscaling": {
    object(NodePoolAutoscaling)
  },
  "desiredLocations": [
    string
  ],
  "desiredMasterAuthorizedNetworksConfig": {
    object(MasterAuthorizedNetworksConfig)
  },
  "desiredMasterVersion": string,
}
Fields
desiredNodeVersion

string

The Kubernetes version to change the nodes to (typically an upgrade). Use - to upgrade to the latest version supported by the server.

desiredMonitoringService

string

The monitoring service the cluster should use to write metrics. Currently available options:

  • "monitoring.googleapis.com" - the Google Cloud Monitoring service
  • "none" - no metrics will be exported from the cluster

desiredAddonsConfig

object(AddonsConfig)

Configurations for the various addons available to run in the cluster.

desiredNodePoolId

string

The node pool to be upgraded. This field is mandatory if "desiredNodeVersion", "desired_image_family" or "desiredNodePoolAutoscaling" is specified and there is more than one node pool on the cluster.

desiredImageType

string

The desired image type for the node pool. NOTE: Set the "desired_node_pool" field as well.

desiredNodePoolAutoscaling

object(NodePoolAutoscaling)

Autoscaler configuration for the node pool specified in desiredNodePoolId. If there is only one pool in the cluster and desiredNodePoolId is not provided then the change applies to that single node pool.

desiredLocations[]

string

The desired list of Google Compute Engine locations in which the cluster's nodes should be located. Changing the locations a cluster is in will result in nodes being either created or removed from the cluster, depending on whether locations are being added or removed.

This list must always include the cluster's primary zone.

desiredMasterAuthorizedNetworksConfig

object(MasterAuthorizedNetworksConfig)

Master authorized networks is a Beta feature. The desired configuration options for master authorized networks feature.

desiredMasterVersion

string

The Kubernetes version to change the master to. The only valid value is the latest supported version. Use "-" to have the server automatically select the latest version.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Kubernetes Engine