Managed Services for Kubernetes API, REST: Cluster.update
Updates the specified Kubernetes cluster.
HTTP request
PATCH https://mks.api.cloud.yandex.net/managed-kubernetes/v1/clusters/{clusterId}
Path parameters
Parameter | Description |
---|---|
clusterId | Required. ID of the Kubernetes cluster to update. To get the Kubernetes cluster ID use a list request. |
Body parameters
{
"updateMask": "string",
"name": "string",
"description": "string",
"labels": "object",
"masterSpec": {
"version": {
// `masterSpec.version` includes only one of the fields `version`, `latestRevision`
"version": "string",
"latestRevision": true,
// end of the list of possible fields`masterSpec.version`
},
"maintenancePolicy": {
"autoUpgrade": true,
"maintenanceWindow": {
// `masterSpec.maintenancePolicy.maintenanceWindow` includes only one of the fields `anytime`, `dailyMaintenanceWindow`, `weeklyMaintenanceWindow`
"anytime": {},
"dailyMaintenanceWindow": {
"startTime": {
"hours": "integer",
"minutes": "integer",
"seconds": "integer",
"nanos": "integer"
},
"duration": "string"
},
"weeklyMaintenanceWindow": {
"daysOfWeek": [
{
"days": [
"string"
],
"startTime": {
"hours": "integer",
"minutes": "integer",
"seconds": "integer",
"nanos": "integer"
},
"duration": "string"
}
]
},
// end of the list of possible fields`masterSpec.maintenancePolicy.maintenanceWindow`
}
},
"securityGroupIds": [
"string"
],
"masterLogging": {
"enabled": true,
"auditEnabled": true,
"clusterAutoscalerEnabled": true,
"kubeApiserverEnabled": true,
"eventsEnabled": true,
// `masterSpec.masterLogging` includes only one of the fields `logGroupId`, `folderId`
"logGroupId": "string",
"folderId": "string",
// end of the list of possible fields`masterSpec.masterLogging`
},
"locations": [
{
"zoneId": "string",
"subnetId": "string"
}
]
},
"serviceAccountId": "string",
"nodeServiceAccountId": "string",
"networkPolicy": {
"provider": "string"
},
"ipAllocationPolicy": {
"clusterIpv4CidrBlock": "string",
"nodeIpv4CidrMaskSize": "string",
"serviceIpv4CidrBlock": "string",
"clusterIpv6CidrBlock": "string",
"serviceIpv6CidrBlock": "string"
},
"gatewayIpv4Address": "string"
}
Field | Description |
---|---|
updateMask | string A comma-separated names off ALL fields to be updated. Only the specified fields will be changed. The others will be left untouched. If the field is specified in If |
name | string Name of the Kubernetes cluster. The name must be unique within the folder. Value must match the regular expression |
description | string Description of the Kubernetes cluster. The maximum string length in characters is 256. |
labels | object Resource labels as Existing set of No more than 64 per resource. The string length in characters for each key must be 1-63. Each key must match the regular expression |
masterSpec | object Specification of the master update. |
masterSpec. version |
object Specification of the master update. |
masterSpec. version. version |
string masterSpec.version includes only one of the fields version , latestRevision Request update to a newer version of Kubernetes (1.x -> 1.y). |
masterSpec. version. latestRevision |
boolean (boolean) masterSpec.version includes only one of the fields version , latestRevision Request update to the latest revision for the current version. |
masterSpec. maintenancePolicy |
object Maintenance policy of the master. |
masterSpec. maintenancePolicy. autoUpgrade |
boolean (boolean) If set to true, automatic updates are installed in the specified period of time with no interaction from the user. If set to false, automatic upgrades are disabled. |
masterSpec. maintenancePolicy. maintenanceWindow |
object Maintenance window settings. Update will start at the specified time and last no more than the specified duration. The time is set in UTC. |
masterSpec. maintenancePolicy. maintenanceWindow. anytime |
object Updating the master at any time. masterSpec.maintenancePolicy.maintenanceWindow includes only one of the fields anytime , dailyMaintenanceWindow , weeklyMaintenanceWindow |
masterSpec. maintenancePolicy. maintenanceWindow. dailyMaintenanceWindow |
object Updating the master on any day during the specified time window. masterSpec.maintenancePolicy.maintenanceWindow includes only one of the fields anytime , dailyMaintenanceWindow , weeklyMaintenanceWindow |
masterSpec. maintenancePolicy. maintenanceWindow. dailyMaintenanceWindow. startTime |
object Required. Window start time, in the UTC timezone. Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp. |
masterSpec. maintenancePolicy. maintenanceWindow. dailyMaintenanceWindow. startTime. hours |
integer (int32) Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time. |
masterSpec. maintenancePolicy. maintenanceWindow. dailyMaintenanceWindow. startTime. minutes |
integer (int32) Minutes of hour of day. Must be from 0 to 59. |
masterSpec. maintenancePolicy. maintenanceWindow. dailyMaintenanceWindow. startTime. seconds |
integer (int32) Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds. |
masterSpec. maintenancePolicy. maintenanceWindow. dailyMaintenanceWindow. startTime. nanos |
integer (int32) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. |
masterSpec. maintenancePolicy. maintenanceWindow. dailyMaintenanceWindow. duration |
string Window duration. Acceptable values are 3600 seconds to 86400 seconds, inclusive. |
masterSpec. maintenancePolicy. maintenanceWindow. weeklyMaintenanceWindow |
object Updating the master on selected days during the specified time window. masterSpec.maintenancePolicy.maintenanceWindow includes only one of the fields anytime , dailyMaintenanceWindow , weeklyMaintenanceWindow |
masterSpec. maintenancePolicy. maintenanceWindow. weeklyMaintenanceWindow. daysOfWeek[] |
object Required. Days of the week and the maintenance window for these days when automatic updates are allowed. The number of elements must be in the range 1-7. |
masterSpec. maintenancePolicy. maintenanceWindow. weeklyMaintenanceWindow. daysOfWeek[]. days[] |
string Required. Days of the week when automatic updates are allowed. The number of elements must be in the range 1-7.
|
masterSpec. maintenancePolicy. maintenanceWindow. weeklyMaintenanceWindow. daysOfWeek[]. startTime |
object Required. Window start time, in the UTC timezone. Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp. |
masterSpec. maintenancePolicy. maintenanceWindow. weeklyMaintenanceWindow. daysOfWeek[]. startTime. hours |
integer (int32) Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time. |
masterSpec. maintenancePolicy. maintenanceWindow. weeklyMaintenanceWindow. daysOfWeek[]. startTime. minutes |
integer (int32) Minutes of hour of day. Must be from 0 to 59. |
masterSpec. maintenancePolicy. maintenanceWindow. weeklyMaintenanceWindow. daysOfWeek[]. startTime. seconds |
integer (int32) Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds. |
masterSpec. maintenancePolicy. maintenanceWindow. weeklyMaintenanceWindow. daysOfWeek[]. startTime. nanos |
integer (int32) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. |
masterSpec. maintenancePolicy. maintenanceWindow. weeklyMaintenanceWindow. daysOfWeek[]. duration |
string Window duration. Acceptable values are 3600 seconds to 86400 seconds, inclusive. |
masterSpec. securityGroupIds[] |
string Master security groups. |
masterSpec. masterLogging |
object Cloud Logging for master components. |
masterSpec. masterLogging. enabled |
boolean (boolean) Identifies whether Cloud Logging is enabled for master components. |
masterSpec. masterLogging. auditEnabled |
boolean (boolean) Identifies whether Cloud Logging is enabled for audit logs. |
masterSpec. masterLogging. clusterAutoscalerEnabled |
boolean (boolean) Identifies whether Cloud Logging is enabled for cluster-autoscaler. |
masterSpec. masterLogging. kubeApiserverEnabled |
boolean (boolean) Identifies whether Cloud Logging is enabled for kube-apiserver. |
masterSpec. masterLogging. eventsEnabled |
boolean (boolean) Identifies whether Cloud Logging is enabled for events. |
masterSpec. masterLogging. logGroupId |
string masterSpec.masterLogging includes only one of the fields logGroupId , folderId ID of the log group where logs of master components should be stored. Value must match the regular expression |
masterSpec. masterLogging. folderId |
string masterSpec.masterLogging includes only one of the fields logGroupId , folderId ID of the folder where logs should be stored (in default group). Value must match the regular expression |
masterSpec. locations[] |
object Update master instance locations. |
masterSpec. locations[]. zoneId |
string Required. ID of the availability zone where the master resides. |
masterSpec. locations[]. subnetId |
string ID of the VPC network's subnet where the master resides. If not specified and there is a single subnet in specified zone, address in this subnet will be allocated. |
serviceAccountId | string Service account to be used for provisioning Compute Cloud and VPC resources for Kubernetes cluster. Selected service account should have |
nodeServiceAccountId | string Service account to be used by the worker nodes of the Kubernetes cluster to access Container Registry or to push node logs and metrics. |
networkPolicy | object |
networkPolicy. provider |
string |
ipAllocationPolicy | object Allocation policy for IP addresses of services and pods inside the Kubernetes cluster in different availability zones. |
ipAllocationPolicy. clusterIpv4CidrBlock |
string CIDR block. IP range for allocating pod addresses. It should not overlap with any subnet in the network the Kubernetes cluster located in. Static routes will be set up for this CIDR blocks in node subnets. |
ipAllocationPolicy. nodeIpv4CidrMaskSize |
string (int64) Size of the masks that are assigned for each node in the cluster. If not specified, 24 is used. Value must be one of 0, 24, 25, 26, 27 or 28. |
ipAllocationPolicy. serviceIpv4CidrBlock |
string CIDR block. IP range Kubernetes service Kubernetes cluster IP addresses will be allocated from. It should not overlap with any subnet in the network the Kubernetes cluster located in. |
ipAllocationPolicy. clusterIpv6CidrBlock |
string IPv6 range for allocating pod IP addresses. |
ipAllocationPolicy. serviceIpv6CidrBlock |
string IPv6 range for allocating Kubernetes service IP addresses |
gatewayIpv4Address | string Gateway IPv4 address. The maximum string length in characters is 15. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": true,
"metadata": "object",
// includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": "object",
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
createdAt | string (date-time) Creation timestamp. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
createdBy | string ID of the user or service account who initiated the operation. |
modifiedAt | string (date-time) The time when the Operation resource was last modified. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
done | boolean (boolean) If the value is |
metadata | object Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
error | object The error result of the operation in case of failure or cancellation. includes only one of the fields error , response |
error. code |
integer (int32) Error code. An enum value of google.rpc.Code. |
error. message |
string An error message. |
error. details[] |
object A list of messages that carry the error details. |
response | object includes only one of the fields error , response The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is the standard Create/Update, the response should be the target resource of the operation. Any method that returns a long-running operation should document the response type, if any. |