Delete a network load balancer
To delete a network load balancer:
- Open the Load Balancer section in the folder to delete the load balancer from.
- Click in the row of the load balancer to delete.
- In the menu that opens, click Delete.
- In the window that opens, click Delete.
If you don't have the Yandex.Cloud command-line interface, install 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.
-
See the description of the CLI's delete network load balancer command:
$ yc load-balancer network-load-balancer delete --help
-
Get a list of all load balancers:
$ yc load-balancer network-load-balancer list +----------------------+--------------------+-------+ | ID | NAME | ... | +----------------------+------+-------------+-------+ ... | b7r97ah2jn5rmo6k1dsk | test-load-balancer | ... | ... +----------------------+------+-------------+-------+
-
Select the identifier (
ID
) or name (NAME
) of the load balancer you need. -
Delete the load balancer:
$ yc load-balancer network-load-balancer delete b7r97ah2jn5rmo6k1dsk
You can delete load balancers using the delete API method.
With Terraform, you can quickly create a cloud infrastructure in Yandex.Cloud. The infrastructure components are identified through configuration files that specify the required cloud resources and their parameters.
Read more about Terraform in the documentation.
Network load balancers created using Terraform can be deleted:
-
In the command line, go to the directory with the Terraform configuration file.
-
Delete resources using the command:
$ terraform destroy
Alert
Terraform deletes all the resources that you created in the current configuration, such as clusters, networks, subnets, and VMs.
-
Confirm the deletion of resources.
Examples
Deleting a network load balancer from a particular folder
To delete a network load balancer from another folder, use the --folder-id
or --folder-name
flags.
$ yc load-balancer network-load-balancer delete test-load-balancer --folder-id b1gnbfd11bq5g5vnjgr4
$ yc load-balancer network-load-balancer delete test-load-balancer --folder-name test-folder