Nebius Israel
Contact usConsole
  • GPU
  • Docs
© 2023 Nebius Israel Ltd
Application Load Balancer
  • Getting started
  • Access management
  • Pricing policy
  • Metric reference
  • Log reference
  1. Step-by-step guides
  2. L7 load balancers
  3. Deleting L7 load balancer

Deleting L7 load balancer

To delete an L7 load balancer:

Management console
CLI
Terraform
API
  1. In the management console, select the folder where the load balancer was created.

  2. Select Application Load Balancer.

  3. Click next to the load balancer name and select Delete.

    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.

  4. 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.

  1. View a description of the CLI command for removing a load balancer:

    yc alb load-balancer delete --help
    
  2. 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:

  1. 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
          }
        }
      }    
    }
    ...
    
  2. In the command line, go to the directory with the Terraform configuration file.

  3. Check the configuration using this command:

    terraform validate
    

    If the configuration is correct, you will get this message:

    Success! The configuration is valid.
    
  4. 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.

  5. Apply the configuration changes:

    terraform apply
    
  6. 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.

© 2023 Nebius Israel Ltd