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:
- Log in to the IBM Cloud console.
- Select the Navigation Menu
, then click Infrastructure > Network > Load balancers.
- Select the Region of your load balancer.
- Click the Actions menu
next to the load balancer that you want to delete, then select Delete.
- 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:
-
Set up your API environment with the right variables.
-
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"