Deleting L7 load balancer
To delete an L7 load balancer:
-
In the management console
, select the folder where the load balancer was created. -
Select Application Load Balancer.
-
Click
To do this with multiple load balancers, select the load balancers to delete in the list and click Delete at the bottom of the screen.
-
In the window that opens, click Delete.
If you don't have the Nebius Israel 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 a description of the CLI command for removing a load balancer:
yc alb load-balancer delete --help
-
Run this command:
yc alb load-balancer delete <load_balancer_ID_or_name>
Result:
done (1m10s)
For more information about Terraform, see our documentation.
To delete an L7 load balancer created with Terraform:
-
Open the Terraform configuration file and delete the fragment with the L7 load balancer description.
Sample L7 load balancer description in the Terraform configuration... resource "yandex_alb_load_balancer" "test-balancer" { name = "<load_balancer_name>" network_id = yandex_vpc_network.test-network.id allocation_policy { location { zone_id = "il1-a" subnet_id = yandex_vpc_subnet.test-subnet.id } } listener { name = "<my-listener>" endpoint { address { external_ipv4_address { } } ports = [ 9000 ] } http { handler { http_router_id = yandex_alb_http_router.test-router.id } } } } ...
-
In the command line, go to the directory with the Terraform configuration file.
-
Check the configuration using this command:
terraform validate
If the configuration is correct, you will get this message:
Success! The configuration is valid.
-
Run this command:
terraform plan
The terminal will display a list of resources with parameters. No changes will be made at this step. If the configuration contains any errors, Terraform will point them out.
-
Apply the configuration changes:
terraform apply
-
Confirm the changes: type
yes
into the terminal and press Enter.You can check the update using the management console
or this CLI command:yc alb load-balancer list
Use the delete REST API method for the LoadBalancer resource or the LoadBalancerService/Delete gRPC API call.