---
title: "Change node count in a Managed Kubernetes cluster"
sidebar_label: "Change node count"
sidebar_position: 4
description: "How to increase or decrease the node count in a group and how to delete a specific node in a group"
toc_max_heading_level: 2
---

import Formbricks from '@theme/MDXComponents/Formbricks'
import MoreVerticalIcon from '@selectel/docux/icons/more-vertical'
import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
import {TabItemLabel} from '@selectel/docux/components'

# Change node count in a Managed Kubernetes cluster

In Managed Kubernetes clusters, you can [change the number of nodes](#change-number-of-nodes) — decrease or increase the number of nodes in a group. For fault-tolerant operation of system components, we recommend using at least two worker nodes in a cluster.

When you decrease the number of nodes, random nodes are removed from the group by default. If necessary, you can [delete a specific node](#delete-specific-node). If there is only one node in the group, you can [delete the entire node group](/managed-kubernetes/node-groups/delete-node-group.mdx). If the Kubernetes version is 1.28 or higher, you can delete all nodes from a node group on a cloud server and leave an empty node group. An empty node group retains node configurations, labels, taints, and user data, but no fees are charged for the nodes.

You can change the node group size in the control panel, through the [Managed Kubernetes API](/api/managed-kubernetes/) or through Terraform.

For nodes on dedicated servers, consider their specific payment details. Learn more in the [Payment for nodes on dedicated servers when changing the node count](#payment-for-dedicated-nodes-when-resizing).

## Payment for nodes on dedicated servers when changing the node count \{#payment-for-dedicated-nodes-when-resizing}

### Payment when increasing the node count \{#payment-for-new-nodes}

When you increase the number of nodes in a cluster, the payment for the new dedicated servers is deducted as a one-time charge using your primary funds. If there are insufficient primary funds in your balance, the node count will not be increased.

If you need to use bonuses to pay for new nodes on dedicated servers, you can create a new node group and add nodes there.

### Refunds when decreasing the node count \{#refund-for-deleted-nodes}

When you decrease the number of nodes in a cluster, in accordance with the [user agreement](https://selectel.ru/about/documents/user-agreement/), funds for dedicated servers will only be refunded for full unused months.

## Change node count \{#change-number-of-nodes}

:::danger

When you decrease the number of nodes in a cluster, random nodes are deleted from the group by default. You can [delete a specific node](#delete-specific-node).

:::

<Tabs queryString="change-number-of-nodes">
  <TabItem value="fixed" default>
    <TabItemLabel>
      Fixed
    </TabItemLabel>

    1. In the [Control panel](https://my.selectel.ru/mks/), on the top menu, click **Products** and select **Managed Kubernetes**.
    2. In the **Clusters** section, open the cluster page → **Node Groups tab**.
    3. In the <MoreVerticalIcon /> menu of the node group, select **Change number of nodes**.
    4. In the **Number of nodes** field, open the **Fixed**.
    5. Specify the required number of nodes. For fault-tolerant operation of system components, we recommend using at least two worker nodes in the cluster. Nodes can be located in different groups.
    6. Click **Save**.
  </TabItem>

  <TabItem value="autoscaling">
    <TabItemLabel>
      With autoscaling
    </TabItemLabel>

    :::info

    Node group autoscaling is unavailable:

    * for node groups with GPU without drivers;
    * node groups on dedicated servers.

    :::

    Autoscaling occurs only if the cluster is in the `ACTIVE` status.

    The actual number of nodes in a group may be less than the minimum number you specify when configuring autoscaling if:

    * you increased the minimum node count in the group after creating the group;
    * the actual number of nodes is sufficient for the current load, and there is no need to increase the node count.

    If a smaller number of nodes is sufficient for the current load in the cluster, but pods cannot be moved for some reason, the node count in the group will not decrease.

    Read more about how autoscaling works in the [Node Group Autoscaling](/managed-kubernetes/node-groups/autoscaling.mdx) instruction.

    1. In the [Control panel](https://my.selectel.ru/mks/), on the top menu, click **Products** and select **Managed Kubernetes**.
    2. In the **Clusters** section, open the cluster page → tab **Cluster Composition**.
    3. In the <MoreVerticalIcon /> menu of the node group, select **Change number of nodes**.
    4. In the **Number of nodes** field, open the **Autoscaling**.
    5. Set the minimum and maximum number of nodes in the group — the number of nodes will only change within this range. For fault-tolerant operation of system components, we recommend using at least two worker nodes in the cluster. Nodes can be located in different groups.
    6. Click **Save**.
  </TabItem>
</Tabs>

## Delete a specific node \{#delete-specific-node}

You can delete a specific node from a group. After deletion, all pods on this node will be distributed across other nodes in the group.

1. In the [Control panel](https://my.selectel.ru/mks/), on the top menu, click **Products** and select **Managed Kubernetes**.
2. In the **Clusters** section, open the cluster page → tab **Cluster Composition**.
3. In the <MoreVerticalIcon /> menu of the node, select **Delete**.
4. Enter the node name to confirm deletion.
5. Click **Delete**.

<Formbricks />
