How to Delete a Vultr Load Balancer

How to Delete a Vultr Load Balancer

Deleting a Vultr Load Balancer involves removing the Load Balancer from your Vultr account, which terminates its service and stops all associated traffic distribution. This action will cease the load balancing operations and clear any related configurations, effectively halting the management of incoming traffic across your servers.

Follow this guide to delete a Vultr Load Balancer on your Vultr account using the Vultr Customer Portal, API, CLI, or Terraform.

  • Vultr Customer Portal
  1. Navigate to Products and click Load Balancers.
  2. Click your target Load Balancer to open its management page.
  3. Click Destroy Load Balancer in the top-right corner of the management page.
  4. Click Delete Load Balancer to permanently delete the target Load Balancer instance.
  • Vultr API
  1. Send a GET request to the List Load Balancers endpoint and note the target Load Balancer’s ID.
    console
    $ curl "https://api.vultr.com/v2/load-balancers" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  2. Send a DELETE request to the Delete Load Balancer endpoint to delete the target Load Balancer.
    console
    $ curl "https://api.vultr.com/v2/load-balancers/{load-balancer-id}" \
        -X DELETE \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
    
    • Vultr CLI
    1. Send a GET request to the List Load Balancers endpoint and note the target Load Balancer’s ID.
      console
      $ curl "https://api.vultr.com/v2/load-balancers" \
          -X GET \
          -H "Authorization: Bearer ${VULTR_API_KEY}"
      
    2. Send a DELETE request to the Delete Load Balancer endpoint to delete the target Load Balancer.
      console
      $ curl "https://api.vultr.com/v2/load-balancers/{load-balancer-id}" \
          -X DELETE \
          -H "Authorization: Bearer ${VULTR_API_KEY}"
      
      
    • Terraform
    1. Open your Terraform configuration file for the existing Load Balancer.
    2. Remove the vultr_load_balancer resource block, or destroy it by target.
      terraform
      resource "vultr_load_balancer" "lb" {
          region              = "ewr"
          label               = "vultr-load-balancer"
          balancing_algorithm = "roundrobin"
      
          forwarding_rules {
              frontend_protocol = "http"
              frontend_port     = 82
              backend_protocol  = "http"
              backend_port      = 81
          }
      
          health_check {
              path                = "/test"
              port                = 8080
              protocol            = "http"
              response_timeout    = 1
              unhealthy_threshold = 2 
              check_interval      = 3
              healthy_threshold   = 4
          }
      }
      
      # To delete, either remove this block from configuration
      # or run: terraform destroy -target vultr_load_balancer.lb
      
    3. Apply the configuration and observe the following output:
      Apply complete! Resources: 0 added, 0 changed, 1 destroyed.
     

How to Delete a Vultr Load Balancer Deleting a Vultr Load Balancer involves removing the Load Balancer from your Vultr account, which terminates its service and stops all associated traffic distribution. This action will cease the load balancing operations and clear any related configurations, effectively halting the management of incoming…

How to Delete a Vultr Load Balancer Deleting a Vultr Load Balancer involves removing the Load Balancer from your Vultr account, which terminates its service and stops all associated traffic distribution. This action will cease the load balancing operations and clear any related configurations, effectively halting the management of incoming…

Leave a Reply

Your email address will not be published. Required fields are marked *