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 Node manager tab.
- On the Node group tab, click
in the row containing the node group to delete. - In the menu that opens, click Delete.
- In the window that opens, click Delete.
If you do not have the Yandex Cloud CLI 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.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validate
Terraform will show any errors found in your configuration files.
-
-
Confirm updating the resources.
-
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.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply
-
Confirm updating the resources.
-
Wait for the operation to complete.
-
-
For more information, see the Terraform