Deleting a GPU cluster
Before deleting a GPU cluster, make sure to delete all its VMs.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
View the description of the delete GPU cluster CLI command:
yc compute gpu-cluster delete --help
-
Get a list of GPU clusters in the default folder:
yc compute gpu-cluster list
-
Select the
ID
orNAME
of the appropriate GPU cluster, e.g.,first-gpu-cluster
. -
Delete the GPU cluster:
yc compute gpu-cluster delete first-gpu-cluster
If you don't have Terraform, install it and configure the Yandex Cloud provider.
-
Open the Terraform configuration file and remove the fragment with the GPU cluster description:
Sample GPU cluster description in the Terraform configuration
... resource "yandex_compute_gpu_cluster" "default" { name = "gpu-cluster-name" interconnect_type = "infiniband" zone = "ru-central1-a" labels = { environment = "test" } } ...
-
Apply the changes:
-
In the terminal, change to the folder where you edited the configuration file.
-
Make sure the configuration file is correct using the command:
terraform validate
If the configuration is correct, the following message is returned:
Success! The configuration is valid.
-
Run the command:
terraform plan
The terminal will display a list of resources with parameters. No changes are made at this step. If the configuration contains errors, Terraform will point them out.
-
Apply the configuration changes:
terraform apply
-
Confirm the changes: type
yes
in the terminal and press Enter.
-
You can check the GPU cluster deletion using the management console
yc compute gpu-cluster list