[Yandex Cloud documentation](../../../index.md) > [Yandex Managed Service for Kubernetes](../../index.md) > [Step-by-step guides](../index.md) > Managing a node group > Deleting a node group

# Deleting a node group

To delete a [node group](../../concepts/index.md#node-group), use its name or ID.

To access a node group, use its name or unique ID obtained using this command:

```bash
yc managed-kubernetes node-group list
```

Result:

```bash
+----------------------+----------------------+-------------+----------------------+---------------------+---------+------+
|          ID          |      CLUSTER ID      |    NAME     |  INSTANCE GROUP ID   |     CREATED AT      | STATUS  | SIZE |
+----------------------+----------------------+-------------+----------------------+---------------------+---------+------+
| catt3knapbq5******** | cati493bu7ia******** | k8s-demo-ng | cl1tbm76ms7p******** | 2019-11-20 12:01:02 | RUNNING |    2 |
+----------------------+----------------------+-------------+----------------------+---------------------+---------+------+
```

{% list tabs group=instructions %}

- Management console {#console}

  To delete a [node group](../../concepts/index.md#node-group):
  1. Navigate to the [Kubernetes cluster](../../concepts/index.md#kubernetes-cluster) you want to delete a node group from:
     1. Open the **Managed Service for&nbsp;Kubernetes** section in the folder.
     1. Open the Kubernetes cluster you need.
     1. Navigate to the **Node management** tab.
  1. On the **Node group** tab, click ![image](../../../_assets/console-icons/ellipsis.svg) in the row with the node group to delete.
  1. In the menu that opens, click **Delete**.
  1. In the window that opens, click **Delete**.

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

  1. Delete the node group:

     ```bash
     yc k8s node-group delete <node_group_name>
     ```

     Result:

     ```text
     done
     ```

  1. Make sure the node group was deleted:

     ```bash
     yc managed-kubernetes node-group list
     ```

     Result:

     ```text
     +----+------------+------+-------------------+------------+--------+------+
     | ID | CLUSTER ID | NAME | INSTANCE GROUP ID | CREATED AT | STATUS | SIZE |
     +----+------------+------+-------------------+------------+--------+------+
     +----+------------+------+-------------------+------------+--------+------+
     ```

- Terraform {#tf}

  To delete a [node group](../../concepts/index.md#node-group):
  1. Open the current Terraform configuration file describing the node group.

     For more on how to create such a file, see [Creating a node group](node-group-create.md).
  1. Delete the section describing the group you no longer need.
  1. 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.
     1. Run this command:
     
        ```bash
        terraform validate
        ```
     
        Terraform will show any errors found in your configuration files.

  1. Confirm updating the resources.

     1. Run this command to view the planned changes:
     
        ```bash
        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.
     
     1. If everything looks correct, apply the changes:
        1. Run this command:
     
           ```bash
           terraform apply
           ```
     
        1. Confirm updating the resources.
        1. Wait for the operation to complete.

     {% note warning "Timeouts" %}
     
     The Terraform provider sets time limits for operations with Managed Service for Kubernetes cluster node groups:
     
     * Creating and editing: 60 minutes.
     * Deleting: 20 minutes.
     
     Operations in excess of this time will be interrupted.
     
     {% cut "How do I modify these limits?" %}
     
     Add the `timeouts` section to the cluster node group description, e.g.:
     
     ```hcl
     resource "yandex_kubernetes_node_group" "<node_group_name>" {
       ...
       timeouts {
         create = "1h30m"
         update = "1h30m"
         delete = "60m"
       }
     }
     ```
     
     {% endcut %}
     
     {% endnote %}

  For more information, see [this Terraform provider guide](../../../terraform/resources/kubernetes_node_group.md).

- API {#api}

  To delete a node group, use the [delete](../../managed-kubernetes/api-ref/NodeGroup/delete.md) REST API method for the [NodeGroup](../../managed-kubernetes/api-ref/NodeGroup/index.md) resource or the [NodeGroupService/Delete](../../managed-kubernetes/api-ref/grpc/NodeGroup/delete.md) gRPC API call.

{% endlist %}