Deleting a GPU cluster
Before deleting a GPU cluster, make sure to delete all its VMs.
- In the management console
, select the folder containing the GPU cluster. - Navigate to Compute Cloud.
- In the left-hand panel, select
GPU clusters. - Next to the GPU cluster, click
and select Delete. - Confirm the deletion.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
-
See the description of the CLI command for deleting a GPU cluster :
yc compute gpu-cluster delete --help -
Get a list of GPU clusters in the default folder:
yc compute gpu-cluster list -
Select the
IDorNAMEof the GPU cluster, e.g.,first-gpu-cluster. -
Delete the GPU cluster:
yc compute gpu-cluster delete first-gpu-cluster
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), authenticate using the appropriate method.
-
Open the Terraform configuration file and delete the section specifying the GPU cluster:
Example of specifying a GPU cluster in 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, navigate to the configuration file directory.
-
Make sure the configuration is correct using this command:
terraform validateIf the configuration is valid, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration.
-
Apply the configuration changes:
terraform apply -
Type
yesand press Enter to confirm the changes.
-
You can check the GPU cluster deletion using the management console
yc compute gpu-cluster list
To delete a GPU cluster, use the delete REST API method for the GpuCluster resource or the GpuClusterService/Delete gRPC API call.