Yandex Cloud
  • Сервисы
  • Решения
  • Почему Yandex Cloud
  • Сообщество
  • Тарифы
  • Документация
  • Связаться с нами
Подключиться
Language / Region
© 2022 ООО «Яндекс.Облако»
Yandex Managed Service for Kubernetes
  • Сопоставление с другими сервисами Yandex Cloud
  • Начало работы
  • Пошаговые инструкции
    • Все инструкции
    • Настройка групп безопасности
    • Подключение к узлу по SSH
    • Создание файла конфигурации
    • Обновление Kubernetes
    • Настройка автомасштабирования
    • Установка приложений
      • Основы работы с Cloud Marketplace
      • Установка Jaeger
      • Установка Metrics Provider
    • Сетевые сценарии
      • Обеспечение доступа к приложению, запущенному в кластере Kubernetes
      • Настройка контроллера сетевых политик Calico
      • Настройка контроллера сетевых политик Cilium
      • Настройка Node Local DNS для контроллера сетевых политик Cilium
    • Работа с постоянными томами
      • Динамическая подготовка тома
      • Статическая подготовка тома
      • Управление классами хранилищ
      • Увеличение размера тома для подов
      • Увеличение размера тома для контроллера StatefulSet
      • Подключение тома в блочном режиме
      • Интеграция с Yandex Object Storage
    • Управление кластером Kubernetes
      • Добавление учетных данных кластера Kubernetes в конфигурационный файл kubectl
      • Информация об имеющихся кластерах
      • Создание кластера Kubernetes
      • Изменение кластера Kubernetes
      • Создание пространства имен в кластере Kubernetes
      • Удаление кластера Kubernetes
    • Управление группой узлов
      • Информация об имеющихся группах узлов
      • Создание группы узлов
      • Изменение группы узлов
      • Управление метками узлов кластера Kubernetes
      • Удаление группы узлов
    • Подключение внешних узлов к кластеру
  • Практические руководства
    • Все руководства
    • Интеграция с Container Registry
    • Запуск рабочих нагрузок с GPU
    • Установка NGINX Ingress-контроллера с Let's Encrypt®
    • Настройка Application Load Balancer Ingress-контроллера
    • Резервное копирование в Object Storage
    • Горизонтальное масштабирование приложения в кластере
    • Работа со снапшотами
    • Интеграция с корпоративной зоной DNS
    • Автоматическое масштабирование DNS по размеру кластера
    • Настройка локального кеширования DNS
    • Настройка Fluent Bit для работы с Yandex Cloud Logging
    • Синхронизация с секретами Yandex Lockbox
    • Использование продуктов Yandex Cloud Marketplace
      • Использование Jaeger для трассировки запросов в Yandex Managed Service for YDB
  • Концепции
    • Взаимосвязь ресурсов сервиса
    • Релизные каналы и обновления
    • Шифрование секретов
    • Использование объектов API Kubernetes
      • Том
      • Сервис
    • Группа узлов
      • Автоматическое масштабирование группы узлов
      • Расселение подов с узла
      • Динамическое резервирование ресурсов для узла
      • Группы узлов с GPU
    • Сеть в Managed Service for Kubernetes
    • Внешние узлы кластера
    • Сетевые настройки и политики кластера
    • Автоматическое масштабирование
    • Квоты и лимиты
    • Рекомендации по использованию Managed Service for Kubernetes
  • Управление доступом
  • Правила тарификации
  • Справочник API
    • Аутентификация в API
    • gRPC (англ.)
      • Overview
      • ClusterService
      • NodeGroupService
      • VersionService
      • OperationService
    • REST (англ.)
      • Overview
      • Cluster
        • Overview
        • create
        • delete
        • get
        • list
        • listNodeGroups
        • listNodes
        • listOperations
        • start
        • stop
        • update
      • NodeGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listNodes
        • listOperations
        • update
      • Version
        • Overview
        • list
  • Вопросы и ответы
    • Общие вопросы
    • Хранилище данных
    • Настройка и обновление
    • Автоматическое масштабирование
    • Ресурсы
    • Логи
    • Все вопросы на одной странице
  1. Справочник API
  2. REST (англ.)
  3. Cluster
  4. update

Method update

Статья создана
Yandex Cloud
,
улучшена
amatol
  • HTTP request
  • Path parameters
  • Body parameters
  • Response

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"
    ]
  },
  "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. Оnly the specified fields will be changed. The others will be left untouched. If the field is specified in updateMask and no value for that field was sent in the request, the field's value will be reset to the default. The default value for most fields is null or 0.

If updateMask is not sent in the request, all fields' values will be updated. Fields specified in the request will be updated to provided values. The rest of the fields will be reset to the default.

name string

Name of the Kubernetes cluster. The name must be unique within the folder.

Value must match the regular expression |[a-z]([-a-z0-9]{0,61}[a-z0-9])?.

description string

Description of the Kubernetes cluster.

The maximum string length in characters is 256.

labels object

Resource labels as key:value pairs.

Existing set of labels is completely replaced by the provided set.

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 [a-z][-_./\@0-9a-z]*. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\@0-9a-z]*.

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

Represents a day of week.

  • DAY_OF_WEEK_UNSPECIFIED: The unspecified day-of-week.
  • MONDAY: The day-of-week of Monday.
  • TUESDAY: The day-of-week of Tuesday.
  • WEDNESDAY: The day-of-week of Wednesday.
  • THURSDAY: The day-of-week of Thursday.
  • FRIDAY: The day-of-week of Friday.
  • SATURDAY: The day-of-week of Saturday.
  • SUNDAY: The day-of-week of Sunday.
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.

serviceAccountId string

Service account to be used for provisioning Compute Cloud and VPC resources for Kubernetes cluster. Selected service account should have edit role on the folder where the Kubernetes cluster will be located and on the folder where selected network resides.

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.

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.

done boolean (boolean)

If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.

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

The error result of the operation in case of failure or cancellation.

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.

Была ли статья полезна?

Language / Region
© 2022 ООО «Яндекс.Облако»
В этой статье:
  • HTTP request
  • Path parameters
  • Body parameters
  • Response