Managed Services for Kubernetes API, REST: Cluster.Update
- HTTP request
- Path parameters
- Body parameters
- MasterUpdateSpec
- UpdateVersionSpec
- MasterMaintenancePolicy
- MaintenanceWindow
- DailyMaintenanceWindow
- TimeOfDay
- WeeklyMaintenanceWindow
- DaysOfWeekMaintenanceWindow
- MasterLogging
- LocationSpec
- ExternalAddressSpec
- MasterScalePolicySpec
- AutoScale
- NetworkPolicy
- IPAllocationPolicy
- WorkloadIdentityFederationSpec
- Response
- Status
Updates the specified Kubernetes cluster.
HTTP request
PATCH https://mks.api.cloud.yandex.net/managed-kubernetes/v1/clusters/{clusterId}
Path parameters
|
Field |
Description |
|
clusterId |
string Required field. ID of the Kubernetes cluster to update. |
Body parameters
{
"updateMask": "string",
"name": "string",
"description": "string",
"labels": "object",
"masterSpec": {
"version": {
// Includes only one of the fields `version`, `latestRevision`
"version": "string",
"latestRevision": "boolean"
// end of the list of possible fields
},
"maintenancePolicy": {
"autoUpgrade": "boolean",
"maintenanceWindow": {
// Includes only one of the fields `anytime`, `dailyMaintenanceWindow`, `weeklyMaintenanceWindow`
"anytime": "object",
"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
}
},
"securityGroupIds": [
"string"
],
"masterLogging": {
"enabled": "boolean",
// Includes only one of the fields `logGroupId`, `folderId`
"logGroupId": "string",
"folderId": "string",
// end of the list of possible fields
"auditEnabled": "boolean",
"clusterAutoscalerEnabled": "boolean",
"kubeApiserverEnabled": "boolean",
"eventsEnabled": "boolean"
},
"locations": [
{
"zoneId": "string",
"subnetId": "string"
}
],
"externalV6AddressSpec": {
"address": "string"
},
"scalePolicy": {
// Includes only one of the fields `autoScale`
"autoScale": {
"minResourcePresetId": "string"
}
// end of the list of possible fields
}
},
// Includes only one of the fields `gatewayIpv4Address`
"gatewayIpv4Address": "string",
// end of the list of possible fields
"serviceAccountId": "string",
"nodeServiceAccountId": "string",
"networkPolicy": {
"provider": "string"
},
"ipAllocationPolicy": {
"clusterIpv4CidrBlock": "string",
"nodeIpv4CidrMaskSize": "string",
"serviceIpv4CidrBlock": "string",
"clusterIpv6CidrBlock": "string",
"serviceIpv6CidrBlock": "string",
"clusterIpv4CidrBlocks": [
"string"
],
"clusterIpv6CidrBlocks": [
"string"
]
},
"workloadIdentityFederation": {
"enabled": "boolean"
}
}
|
Field |
Description |
|
updateMask |
string (field-mask) A comma-separated names off ALL fields to be updated. If |
|
name |
string Name of the Kubernetes cluster. Value must match the regular expression |
|
description |
string Description of the Kubernetes cluster. The maximum string length in characters is 256. |
|
labels |
object (map<string, string>) Resource labels as The maximum string length in characters for each value is 63. The string length in characters for each key must be 1-63. Each key must match the regular expression |
|
masterSpec |
Specification of the master update. |
|
gatewayIpv4Address |
string Gateway IPv4 address. The maximum string length in characters is 15. Includes only one of the fields |
|
serviceAccountId |
string Service account to be used for provisioning Compute Cloud and VPC resources for Kubernetes cluster. |
|
nodeServiceAccountId |
string Service account to be used by the worker nodes of the Kubernetes cluster to access Container Registry |
|
networkPolicy |
|
|
ipAllocationPolicy |
|
|
workloadIdentityFederation |
MasterUpdateSpec
|
Field |
Description |
|
version |
Specification of the master update. |
|
maintenancePolicy |
Maintenance policy of the master. |
|
securityGroupIds[] |
string Master security groups. |
|
masterLogging |
Export configuration of master logs. |
|
locations[] |
Update master instance locations. |
|
externalV6AddressSpec |
Specification of parameters for external IPv6 networking. |
|
scalePolicy |
Scale policy of the master. |
UpdateVersionSpec
|
Field |
Description |
|
version |
string Request update to a newer version of Kubernetes (1.x -> 1.y). Includes only one of the fields |
|
latestRevision |
boolean Request update to the latest revision for the current version. Includes only one of the fields |
MasterMaintenancePolicy
|
Field |
Description |
|
autoUpgrade |
boolean If set to true, automatic updates are installed in the specified period of time with no interaction from the user. |
|
maintenanceWindow |
Maintenance window settings. Update will start at the specified time and last no more than the specified duration. |
MaintenanceWindow
|
Field |
Description |
|
anytime |
object Updating the master at any time. Includes only one of the fields Maintenance policy. |
|
dailyMaintenanceWindow |
Updating the master on any day during the specified time window. Includes only one of the fields Maintenance policy. |
|
weeklyMaintenanceWindow |
Updating the master on selected days during the specified time window. Includes only one of the fields Maintenance policy. |
DailyMaintenanceWindow
|
Field |
Description |
|
startTime |
Required field. Window start time, in the UTC timezone. |
|
duration |
string (duration) Window duration. |
TimeOfDay
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
|
Field |
Description |
|
hours |
integer (int32) Hours of day in 24 hour format. Should be from 0 to 23. An API may choose |
|
minutes |
integer (int32) Minutes of hour of day. Must be from 0 to 59. |
|
seconds |
integer (int32) Seconds of minutes of the time. Must normally be from 0 to 59. An API may |
|
nanos |
integer (int32) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. |
WeeklyMaintenanceWindow
|
Field |
Description |
|
daysOfWeek[] |
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. |
DaysOfWeekMaintenanceWindow
|
Field |
Description |
|
days[] |
enum (DayOfWeek) Days of the week when automatic updates are allowed. The number of elements must be in the range 1-7.
|
|
startTime |
Required field. Window start time, in the UTC timezone. |
|
duration |
string (duration) Window duration. |
MasterLogging
|
Field |
Description |
|
enabled |
boolean Specifies whether master logs should be exported. |
|
logGroupId |
string ID of the log group where logs of master components should be stored. Value must match the regular expression Includes only one of the fields The destination of master components' logs. |
|
folderId |
string ID of the folder where logs should be stored. Value must match the regular expression Includes only one of the fields The destination of master components' logs. |
|
auditEnabled |
boolean Specifies whether audit logs should be exported |
|
clusterAutoscalerEnabled |
boolean Specifies whether cluster-autoscaler logs should be exported |
|
kubeApiserverEnabled |
boolean Specifies whether kube-apiserver logs should be exported |
|
eventsEnabled |
boolean Specifies whether Kubernetes events should be exported |
LocationSpec
|
Field |
Description |
|
zoneId |
string Required field. ID of the availability zone where the master resides. |
|
subnetId |
string ID of the VPC network's subnet where the master resides. |
ExternalAddressSpec
|
Field |
Description |
|
address |
string IP address. |
MasterScalePolicySpec
|
Field |
Description |
|
autoScale |
Includes only one of the fields |
AutoScale
Scalable master instance resources.
|
Field |
Description |
|
minResourcePresetId |
string Required field. Preset of computing resources to be used as lower boundary for scaling. |
NetworkPolicy
|
Field |
Description |
|
provider |
enum (Provider)
|
IPAllocationPolicy
|
Field |
Description |
|
clusterIpv4CidrBlock |
string CIDR block. IP range for allocating pod addresses. |
|
nodeIpv4CidrMaskSize |
string (int64) Size of the masks that are assigned for each node in the cluster. |
|
serviceIpv4CidrBlock |
string CIDR block. IP range Kubernetes service Kubernetes cluster IP addresses will be allocated from. |
|
clusterIpv6CidrBlock |
string IPv6 range for allocating pod IP addresses. |
|
serviceIpv6CidrBlock |
string IPv6 range for allocating Kubernetes service IP addresses |
|
clusterIpv4CidrBlocks[] |
string IP ranges for allocating pod addresses (multiple CIDRs for dual-stack or extended address space). |
|
clusterIpv6CidrBlocks[] |
string IPv6 ranges for allocating pod addresses (multiple CIDRs). |
WorkloadIdentityFederationSpec
|
Field |
Description |
|
enabled |
boolean Identifies whether Workload Identity Federation is enabled. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": "boolean",
"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 To work with values in this field, use the APIs described in the |
|
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 To work with values in this field, use the APIs described in the |
|
done |
boolean If the value is |
|
metadata |
object Service-specific metadata associated with the operation. |
|
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
|
response |
object The normal response of the operation in case of success. Includes only one of the fields The operation result. |
Status
The error result of the operation in case of failure or cancellation.
|
Field |
Description |
|
code |
integer (int32) Error code. An enum value of google.rpc.Code |
|
message |
string An error message. |
|
details[] |
object A list of messages that carry the error details. |