Deleting a node group
To delete a node group, use its name or ID.
To access a node group, use its name or unique ID obtained using the command:
yc managed-kubernetes node-group list
Result:
+----------------------+----------------------+-------------+----------------------+---------------------+---------+------+
| 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 |
+----------------------+----------------------+-------------+----------------------+---------------------+---------+------+
To delete a node group:
- Go to the Kubernetes cluster you want to delete a node group from:
- Open the Managed Service for Kubernetes section in the folder.
- Open the Kubernetes cluster you need.
- Go to the Nodes manager tab.
- On the Node group tab, click
in the row of the node group you need to delete. - In the menu that opens, click Delete.
- In the window that opens, click Delete.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
-
Delete the node group:
yc k8s node-group delete <node_group_name>
Result:
done
-
Make sure that the node group was deleted:
yc managed-kubernetes node-group list
Result:
+----+------------+------+-------------------+------------+--------+------+ | ID | CLUSTER ID | NAME | INSTANCE GROUP ID | CREATED AT | STATUS | SIZE | +----+------------+------+-------------------+------------+--------+------+ +----+------------+------+-------------------+------------+--------+------+
To delete a node group:
-
Open the current Terraform configuration file describing the node group.
For more information about creating this file, see Creating a node group.
-
Delete the section describing a group you no longer need.
-
Make sure the configuration files are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Confirm updating the resources.
-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
-
For more information, see the Terraform