Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Managed Service for Kubernetes
  • Comparison with other Yandex Cloud services
  • Getting started
    • All guides
    • Connecting to a node over SSH
    • Connecting to a node via OS Login
    • Updating Kubernetes
    • Configuring autoscaling
      • Getting information about a Kubernetes cluster
      • Viewing operations with a Kubernetes cluster
      • Creating a Kubernetes cluster
      • Updating a Kubernetes cluster
      • Creating a namespace in a Kubernetes cluster
      • Monitoring cluster state Kubernetes
      • Deleting a Kubernetes cluster
    • Connecting external nodes to the cluster
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes

In this article:

  • Changing Managed Service for Kubernetes clusters
  • Managing Managed Service for Kubernetes cluster cloud labels
  • Adding a cloud label
  • Updating a cloud label
  • Deleting a cloud label
  • Updating the master resource configuration
  1. Step-by-step guides
  2. Managing a Kubernetes cluster
  3. Updating a Kubernetes cluster

Updating a Managed Service for Kubernetes cluster

Written by
Yandex Cloud
Updated at May 5, 2025
  • Changing Managed Service for Kubernetes clusters
  • Managing Managed Service for Kubernetes cluster cloud labels
    • Adding a cloud label
    • Updating a cloud label
    • Deleting a cloud label
  • Updating the master resource configuration

To access a Kubernetes cluster, use its name or unique ID. You can get them by using the following command:

yc managed-kubernetes cluster list

Result:

+----------------------+----------+---------------------+---------+---------+-------------------------+-----------------------+
|          ID          |   NAME   |     CREATED AT      | HEALTH  | STATUS  |    EXTERNAL ENDPOINT    |   INTERNAL ENDPOINT   |
+----------------------+----------+---------------------+---------+---------+-------------------------+-----------------------+
| cati493bu7ia******** | k8s-demo | 2019-11-20 11:26:36 | HEALTHY | RUNNING | https://84.201.174.147/ | https://192.168.0.27/ |
+----------------------+----------+---------------------+---------+---------+-------------------------+-----------------------+

Changing Managed Service for Kubernetes clustersChanging Managed Service for Kubernetes clusters

You can change the following parameters of a Managed Service for Kubernetes cluster:

  • Name.

  • Description.

  • Service accounts.

  • Resource configuration for the master.

  • Kubernetes version.

  • Updates policy.

  • List of security groups.

  • Settings for sending logs to Yandex Cloud Logging.

    Alert

    Do not delete the security groups bound to a running Managed Service for Kubernetes cluster as this might result in disruptions in its operation and data loss.

  • Mask of the Managed Service for Kubernetes node subnet.

    Warning

    If you change the subnet mask of an active Managed Service for Kubernetes cluster, it may run out of CIDR blocks. In this case, you will not be able to deploy pods on new node groups.

To learn how to change a cluster's availability zone, see Migrating Kubernetes resources to a different availability zone.

Management console
CLI
Terraform
API

To update a Managed Service for Kubernetes cluster:

  1. Open Managed Service for Kubernetes in the folder where you want to update the Managed Service for Kubernetes cluster.
  2. Click the name of the Managed Service for Kubernetes cluster.
  3. Click Edit in the top-right corner.
  4. Change the required parameters in the window that opens.
  5. Click Save.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

To update a Managed Service for Kubernetes cluster:

  1. View a description of the update Managed Service for Kubernetes cluster CLI command:

    yc managed-kubernetes cluster update --help
    
  2. Run the following command and provide a list of settings you want to change (not all settings are listed in the example below):

    yc managed-kubernetes cluster update <Managed_Service_for_Kubernetes_cluster_name> \
      --new-name <new_name_for_Managed_Service_for_Kubernetes_cluster> \
      --description <Managed_Service_for_Kubernetes_cluster_description> \
      --service-account-id <ID_of_service_account_for_resources> \
      --service-account-name <name_of_service_account_for_resources> \
      --node-service-account-id <ID_of_service_account_for_Kubernetes_nodes> \
      --security-group-ids <list_of_security_group_IDs> \
      --master-logging enabled=<send_logs>,`
          `log-group-id=<log_group_ID>,`
          `folder-id=<folder_ID>,`
          `kube-apiserver-enabled=<send_kube-apiserver_logs>,`
          `cluster-autoscaler-enabled=<send_cluster-autoscaler_logs>,`
          `events-enabled=<send_Kubernetes_events>`
          `audit-enabled=<send_audit_events>
    

    Where:

    • --new-name: Managed Service for Kubernetes cluster name.

    • --description: Managed Service for Kubernetes cluster description.

    • --service-account-id, --service-account-name: Service account for Managed Service for Kubernetes cluster management.

    • --node-service-account-id, --node-service-account-name: Service account for managing the Managed Service for Kubernetes nodes.

    • --security-group-ids: Managed Service for Kubernetes cluster security groups.

      Warning

      The configuration of security groups determines cluster performance, availability, and services running in the cluster.

    • --master-logging: Sending logs to Cloud Logging:

      • enabled: Flag that enables log sending, true or false.
      • log-group-id: ID of the log group to send the logs to.
      • folder-id: ID of the folder to send the logs to. The logs will be sent to the log group of the default folder.
      • kube-apiserver-enabled: Flag that enables kube-apiserver log sending, true or false.
      • cluster-autoscaler-enabled: Flag that enables cluster-autoscaler log sending, true or false.
      • events-enabled: Flag that enables Kubernetes event sending, true or false.
      • audit-enabled: Flag that enables audit event sending, true or false.

      If log sending is enabled but neither log-group-id nor folder-id is specified, the logs will be sent to the default log group of the folder with the Managed Service for Kubernetes cluster. You cannot set both log-group-id and folder-id at the same time.

    • --version: Kubernetes version.

    • --latest-revision: Get all available updates for the current Managed Service for Kubernetes master version.

    • --auto-upgrade: Manage automatic Managed Service for Kubernetes cluster updates.

    • Managing the maintenance window:

      • --anytime-maintenance-window: Update at any time.
      • --daily-maintenance-window: Update daily at the selected time.
      • --weekly-maintenance-window: Update on selected days.

To update a Managed Service for Kubernetes cluster:

  1. Open the current configuration file with the Managed Service for Kubernetes cluster description.

    For more information about creating this file, see Creating a Managed Service for Kubernetes cluster.

  2. Edit the required parameters in the Managed Service for Kubernetes cluster description.

    To edit the settings for sending logs to Cloud Logging, configure the master_logging section parameters. If there is no such section, create one.

    resource "yandex_kubernetes_cluster" "<cluster_name>" {
     ...
     master {
       ...
       master_logging {
         enabled                    = <log_sending>
         log_group_id               = "<log_group_ID>"
         folder_id                  = "<folder_ID>"
         kube_apiserver_enabled     = <kube-apiserver_log_sending>
         cluster_autoscaler_enabled = <cluster-autoscaler_log_sending>
         events_enabled             = <Kubernetes_event_sending>
         audit_enabled              = <audit_event_sending>
       }
     }
    }
    

    Where:

    • enabled: Flag that enables log sending, true or false.
    • log_group_id: ID of the log group to send the logs to.
    • folder_id: ID of the folder to send the logs to. The logs will be sent to the log group of the default folder.
    • kube_apiserver_enabled: Flag that enables kube-apiserver log sending, true or false.
    • cluster_autoscaler_enabled: Flag that enables cluster-autoscaler log sending, true or false.
    • events_enabled: Flag that enables Kubernetes event sending, true or false.
    • audit_enabled: Flag that enables audit event sending, true or false.

    If log sending is enabled but neither log_group_id nor folder_id is specified, the logs will be sent to the default log group of the folder with the Managed Service for Kubernetes cluster. You cannot set both log_group_id and folder_id at the same time.

  3. Make sure the configuration files are correct.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  4. Confirm updating the resources.

    1. Run this command to view the planned changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

    For more information, see the Terraform provider documentation.

To update Managed Service for Kubernetes cluster parameters, use the update method for the Cluster resource.

To edit the settings for sending logs to Cloud Logging, configure their masterSpec.masterLogging parameter values.

Managing Managed Service for Kubernetes cluster cloud labelsManaging Managed Service for Kubernetes cluster cloud labels

You can perform the following actions with Managed Service for Kubernetes cluster cloud labels:

  • Add
  • Edit
  • Delete

Adding a cloud labelAdding a cloud label

Management console
CLI
  1. Open Managed Service for Kubernetes in the folder containing the Managed Service for Kubernetes cluster.
  2. Click the name of the Managed Service for Kubernetes cluster.
  3. Click Edit in the top-right corner.
  4. In the Labels field, click Add label.
  5. Enter the key and the value, and press Enter.
  6. Click Save.

Run this command:

yc managed-kubernetes cluster add-labels k8s-demo --labels new_label=test_label

Result:

done (1s)
id: abcd123ef4gh********
folder_id: l1m01nopqr1s********
...
description: My test Kubernetes cluster
labels:
  new_label: test_label
...

Updating a cloud labelUpdating a cloud label

Management console
CLI

To update a cloud label, you will need to delete and re-create it:

  1. Open Managed Service for Kubernetes in the folder containing the Managed Service for Kubernetes cluster.
  2. Click the name of the Managed Service for Kubernetes cluster.
  3. Click Edit in the top-right corner.
  4. In the Labels field, click the cross next to the label to delete it.
  5. Click Add label and enter a key and/or value for the new label.
  6. Press Enter and click Save.

Run this command:

yc managed-kubernetes cluster update k8s-demo --labels test_label=my_k8s_label

Warning

The existing labels (labels) will be completely overwritten by the ones you provide in your request.

Result:

done (1s)
id: abcd123ef4gh********
folder_id: l1m01nopqr1s********
...
description: My test Kubernetes cluster
labels:
  test_label: my_k8s_label
...

Deleting a cloud labelDeleting a cloud label

Management console
CLI
  1. Open Managed Service for Kubernetes in the folder containing the Managed Service for Kubernetes cluster.
  2. Click the name of the Managed Service for Kubernetes cluster.
  3. Click Edit in the top-right corner.
  4. In the Labels field, click the cross next to the label.
  5. Click Save.

Run this command:

yc managed-kubernetes cluster remove-labels k8s-demo --labels test_label

Result:

done (1s)
id: cati493bu7ia********
folder_id: b1g88tflru0e********
created_at: "2019-11-20T11:26:36Z"
name: k8s-demo
...

Updating the master resource configurationUpdating the master resource configuration

Management console
  1. Open Managed Service for Kubernetes in the folder where you want to update the Managed Service for Kubernetes cluster.

  2. Click the name of the Managed Service for Kubernetes cluster.

  3. Click Edit in the top-right corner.

  4. Under Master configuration, expand the Compute resources section and select a resource configuration for the master.

    By default the following resources are provided for the operation of one master host:

    • Platform: Intel Cascade Lake
    • Guaranteed vCPU share: 100%
    • vCPU: 2.
    • RAM: 8 GB

    Note

    The feature of selecting and updating a master configuration is at the Preview stage.

  5. Click Save.

Was the article helpful?

Previous
Creating a Kubernetes cluster
Next
Creating a namespace in a Kubernetes cluster
Yandex project
© 2025 Yandex.Cloud LLC