IBM Cloud Docs
Deleting an application load balancer

Deleting an application load balancer

You can delete an IBM Cloud® Application Load Balancer for VPC (ALB) with the console, CLI, or API.

Deleting an application load balancer in the console

To delete an ALB by in the IBM Cloud console, perform the following procedure:

  1. Log in to the IBM Cloud console.
  2. Select the Navigation menu Menu icon, then click Infrastructure VPC icon > Network > Load balancers from the Network section.
  3. Select the Region of your load balancer.
  4. Click the Actions menu Actions menu next to the load balancer that you want to delete, then select Delete.

The Status for the load balancer now shows Deleting. Refresh the page to confirm that the load balancer was deleted.

Deleting an application load balancer from the CLI

Before you begin, set up your CLI environment.

To delete an ALB from the CLI, run the following command:

ibmcloud is load-balancer-delete <load_balancer_id> -f -q

Where:

  • load_balancer_id is the ID of the load balancer (for example, r006-99b5ab45-6357-42db-8b32-5d2c8aa62776).
  • --force, -f forces the operation without confirmation.
  • --quiet, -q suppresses verbose output.

The following example is sample output:

This command deletes Load balancer r006-99b5ab45-6357-42db-8b32-5d2c8aa62776 and cannot be undone. Continue [y/n] ?> y
Deleting load balancer r006-99b5ab45-6357-42db-8b32-5d2c8aa62776 under account IBM Cloud Network Services as user test@ibm.com...
OK
Deletion request for load balancer r006-99b5ab45-6357-42db-8b32-5d2c8aa62776 was accepted.

Deleting an application load balancer with the API

To delete an ALB with the API, perform the following procedure:

  1. Set up your API environment with the right variables.

  2. Run the following command to delete the load balancer:

    curl -H "Authorization: $iam_token" -X DELETE "$vpc_api_endpoint/v1/load_balancers/$lbid?version=$api_version&generation=2"