Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Solutions
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Managed Service for Kubernetes
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Connecting to a node over SSH
    • Creating a configuration file
    • Configuring a Kubernetes cluster network
      • Granting access to an app running in a Kubernetes cluster
      • Using Kubernetes cluster network policies
    • Encrypting secrets
    • Using persistent volumes
      • Dynamically preparing volumes
      • Statically preparing volumes
      • Managing storage classes
      • Expanding a volume
      • Mounting a volume in Block mode
    • Managing a Kubernetes cluster
      • Adding Kubernetes cluster credentials to the kubectl configuration file
      • Getting information about a Kubernetes cluster
      • Creating a Kubernetes cluster
      • Editing a Kubernetes cluster
      • Deleting a Kubernetes cluster
    • Managing a node group
      • Getting information about a node group
      • Creating a node group
      • Editing a node group
      • Deleting a node group
  • Solutions
    • All solutions
    • Integration with Container Registry
    • Running workloads with GPUs
    • Installing the NGINX Ingress Controller with Let's Encrypt®
    • Making backups to Object Storage
  • Concepts
    • Relationship between service resources
    • Release channels and updates
    • Using Kubernetes API objects
      • Volume
      • Service
    • Node group
      • Autoscaling node groups
      • Evicting pods from a node
      • Dynamic resource allocation for a node
      • Node groups with GPUs
    • Kubernetes cluster network policies
    • Quotas and limits
  • Access management
  • Pricing policy
  • API reference
    • Authentication in the 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
  • Questions and answers
  1. Step-by-step instructions
  2. Managing a Kubernetes cluster
  3. Editing a Kubernetes cluster

Changing clusters Kubernetes

  • Changing clusters Kubernetes
  • Managing cluster labels Kubernetes
    • Adding a label
    • Updating a label
    • Deleting a label

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
+----------------------+----------+---------------------+---------+---------+-------------------------+-----------------------+
|          ID          |   NAME   |     CREATED AT      | HEALTH  | STATUS  |    EXTERNAL ENDPOINT    |   INTERNAL ENDPOINT   |
+----------------------+----------+---------------------+---------+---------+-------------------------+-----------------------+
| cati493bu7ian006a5j7 | k8s-demo | 2019-11-20 11:26:36 | HEALTHY | RUNNING | https://84.201.174.147/ | https://192.168.0.27/ |
+----------------------+----------+---------------------+---------+---------+-------------------------+-----------------------+

Changing clusters Kubernetes

You can change the following parameters of a Kubernetes cluster:

  • Name.
  • Description.
  • Service accounts.
  • Kubernetes version.
  • Update policy.
Management console
CLI
API

To change a Kubernetes cluster:

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

Get detailed information about the command to change a Kubernetes cluster:

$ yc managed-kubernetes cluster update --help

To change the Kubernetes cluster, use the following parameters:

  • --new-name: Change the name.
  • --description: Change the description.
  • --service-account-id, --service-account-name: Change the service account for the resources.
  • --node-service-account-id, --node-service-account-name: Change the service account for the nodes.
  • --version: Change the Kubernetes version.
  • --latest-revision: Get all available updates for the current version of the master.
  • --auto-upgrade: Manage automatic updates.
  • Managing the maintenance window:
    • --anytime-maintenance-window: Run the maintenance at any time.
    • --daily-maintenance-window: Perform maintenance daily at the selected time.
    • --weekly-maintenance-window: Perform maintenance on the selected days.

To change the parameters of a Kubernetes cluster, use the update method for the Cluster resource.

Managing cluster labels Kubernetes

You can perform the following actions with Kubernetes cluster labels:

  • Add a label
  • Update a label
  • Delete a label

Adding a label

CLI

If you don't have the Yandex.Cloud command line interface yet, install and initialize it.

Add a label to the Kubernetes cluster:

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

done (1s)
id: cati493bu7ian006a4a8
folder_id: b1g88tflru0ek1omtsu0
created_at: "2019-11-20T11:26:36Z"
name: k8s-demo
description: My test Kubernetes cluster
labels:
new_label: test_label
...

Updating a label

CLI

If you don't have the Yandex.Cloud command line interface yet, install and initialize it.

Change the Kubernetes cluster label:

Warning

The existing set of labels is completely replaced by the set transmitted.

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

done (1s)
id: cati493bu7ian006a4a8
folder_id: b1g88tflru0ek1omtsu0
created_at: "2019-11-20T11:26:36Z"
name: k8s-demo
description: My test Kubernetes cluster
labels:
test_label: my_k8s_label
status: RUNNING
health: HEALTHY
...

Deleting a label

CLI

If you don't have the Yandex.Cloud command line interface yet, install and initialize it.

Remove a label from a Kubernetes cluster:

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

done (1s)
id: cati493bu7ian006a4a8
folder_id: b1g88tflru0ek1omtsu0
created_at: "2019-11-20T11:26:36Z"
name: k8s-demo
description: My test Kubernetes cluster
status: RUNNING
health: HEALTHY
...
In this article:
  • Changing clusters Kubernetes
  • Managing cluster labels Kubernetes
  • Adding a label
  • Updating a label
  • Deleting a label
Language / Region
Careers
Privacy policy
Terms of use
Brandbook
© 2021 Yandex.Cloud LLC