IBM Cloud Docs
Deleting a network load balancer

Deleting a network load balancer

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

Deleting a network load balancer in the console

To delete a network load balancer with the IBM Cloud console, perform the following procedure:

  1. Log in to the IBM Cloud console.
  2. Select the Navigation Menu Navigation Menu icon, then click Infrastructure > Network > Load balancers.
  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.
  5. Confirm the deletion. This action cannot be undone.

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

Deleting a network load balancer from the CLI

To delete a Network Load Balancer for VPC with 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.

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 a network load balancer with the API

To delete a network load balancer 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"