Yandex Cloud
  • Сервисы
  • Решения
  • Почему Yandex Cloud
  • Сообщество
  • Тарифы
  • Документация
  • Связаться с нами
Подключиться
Language / Region
Проект Яндекса
© 2023 ООО «Яндекс.Облако»
Yandex Managed Service for Kubernetes
  • Сопоставление с другими сервисами Yandex Cloud
  • Начало работы
  • Пошаговые инструкции
    • Все инструкции
    • Подключение к узлу по SSH
    • Обновление Kubernetes
    • Настройка автомасштабирования
    • Подключение к кластеру
      • Обзор способов подключения
      • Настройка групп безопасности
      • Создание статического файла конфигурации
    • Установка приложений из Cloud Marketplace
      • Основы работы с Cloud Marketplace
      • Установка Argo CD
      • Установка Container Storage Interface для S3
      • Установка Crossplane
      • Установка External Secrets Operator
      • Установка Falco
      • Установка Filebeat
      • Установка Fluent Bit
      • Установка Gateway API
      • Установка GitLab Agent
      • Установка GitLab Runner
      • Установка HashiCorp Vault
      • Установка Ingress-контроллера Application Load Balancer
      • Установка Jaeger
      • Установка Kyverno & Kyverno Policies
      • Установка Loki
      • Установка Metrics Provider
      • Установка NodeLocal DNS
      • Установка Policy Reporter
      • Установка Thumbor
    • Сетевые сценарии
      • Обеспечение доступа к приложению, запущенному в кластере Kubernetes
      • Настройка контроллера сетевых политик Calico
      • Настройка контроллера сетевых политик Cilium
      • Настройка NodeLocal DNS для контроллера сетевых политик Cilium
    • Работа с постоянными томами
      • Динамическая подготовка тома
      • Статическая подготовка тома
      • Управление классами хранилищ
      • Увеличение размера тома для подов
      • Увеличение размера тома для контроллера StatefulSet
      • Подключение тома в блочном режиме
      • Интеграция с Object Storage
    • Управление кластером Kubernetes
      • Получение информации о кластере Kubernetes
      • Создание кластера Kubernetes
      • Изменение кластера Kubernetes
      • Создание пространства имен в кластере Kubernetes
      • Удаление кластера Kubernetes
    • Управление группой узлов
      • Информация об имеющихся группах узлов
      • Создание группы узлов
      • Подключение к узлу по SSH
      • Настройка автомасштабирования
      • Изменение группы узлов
      • Управление метками узлов кластера Kubernetes
      • Удаление группы узлов
    • Подключение внешних узлов к кластеру
  • Практические руководства
    • Все руководства
    • Создание нового Kubernetes-проекта в Yandex Cloud
    • Интеграция с Container Registry
    • Подпись и проверка Docker-образов Container Registry
    • Сканирование уязвимостей Container Registry при непрерывном развертывании приложений с помощью GitLab
    • Запуск рабочих нагрузок с GPU
    • Установка Ingress-контроллера NGINX с Let's Encrypt®
    • Установка Ingress-контроллера NGINX с сертификатом из Certificate Manager
    • Резервное копирование в Object Storage
    • Горизонтальное масштабирование приложения в кластере
    • Вертикальное масштабирование приложения в кластере
    • Развертывание и нагрузочное тестирование gRPC-сервиса с масштабированием
    • Работа со снапшотами
    • Интеграция с корпоративной зоной DNS
    • Автоматическое масштабирование DNS по размеру кластера
    • Настройка локального кеширования DNS
    • Проверка DNS Challenge для сертификатов Let's Encrypt®
    • Мониторинг кластера с помощью Prometheus и Grafana
    • Непрерывное развертывание контейнеризованных приложений с помощью GitLab
    • Изменение параметров сервера метрик (Metrics Server)
    • Использование продуктов Cloud Marketplace
      • Интеграция с Argo CD
      • Интеграция с Crossplane
      • Синхронизация с секретами Yandex Lockbox
      • Настройка Fluent Bit для работы с Cloud Logging
      • Настройка Gateway API
      • Настройка Application Load Balancer Ingress-контроллера
      • Использование Jaeger для трассировки запросов в Managed Service for YDB
      • Настройка Kyverno & Kyverno Policies
      • Использование Metrics Provider для трансляции метрик
  • Концепции
    • Взаимосвязь ресурсов сервиса
    • Релизные каналы и обновления
    • Шифрование секретов
    • Использование объектов 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

Managed Services for Kubernetes API, REST: Cluster.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"
    ],
    "masterLogging": {
      "enabled": 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`

    }
  },
  "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 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

Required. Days of the week when automatic updates are allowed.

The number of elements must be in the range 1-7.

  • 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.

masterSpec.
masterLogging
object

Cloud Logging for master components.

masterSpec.
masterLogging.
enabled
boolean (boolean)

Identifies whether Cloud Logging is enabled for master components.

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 ([a-zA-Z][-a-zA-Z0-9_.]{0,63})?.

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 ([a-zA-Z][-a-zA-Z0-9_.]{0,63})?.

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. The range of possible values is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

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 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

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 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
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
Проект Яндекса
© 2023 ООО «Яндекс.Облако»
В этой статье:
  • HTTP request
  • Path parameters
  • Body parameters
  • Response