Delete a load balancer
Delete a load balancer with its services, targets and rules, and release its addresses.
The instances that were targets keep running; only the forwarding stops.
Warning
Deleting cannot be undone. An lb11, lb21, lb31 or public dedicated load balancer's IPv4
and IPv6 addresses are released, so a DNS record that points at them stops reaching your
instances, and a new load balancer gets new addresses. An application load balancer's platform
name and the names of its https services stop being served; the fleet's shared addresses stay.
Prerequisites
- Permission for
lb:DeleteLoadBalanceron the load balancer. - In the console, also
lb:DescribeLoadBalancerson it; without it its page answers 404. - A load balancer that is the endpoint of one of your databases, caches, brokers or MySQL clusters is deleted with that service, and one a Kubernetes Service of type LoadBalancer owns is deleted by deleting that Service. Neither can be deleted here: the console shows no Danger zone tab for the first, and a disabled button for the second.
Delete it
- Open Load balancers, then open the load balancer.
- Open the Danger zone tab. (The Delete load balancer item of the page's actions menu opens it too.)
- Under Delete this load balancer, choose Delete load balancer.
- Type the load balancer's name, then choose Delete load balancer.
The console returns to the list. Without the permission, the row says "Your policies do not grant lb:DeleteLoadBalancer; ask an administrator." and the button is off.
dcloud lb load-balancers delete lb-idDELETE /lb/api/load-balancers/lb-idRemove the dcloud_lb resource from your configuration and apply, or run
terraform destroy -target=dcloud_lb.web.
Result
The call answers once the load balancer is gone: 200 with its id. An lb11, lb21 or
lb31 is deleted at the provider first; a dedicated one releases its address first; an
application one leaves the fleet with its next configuration.
When it is refused
409for a load balancer another service owns; see Prerequisites.502when the provider refuses the delete. The load balancer is then inerror, with the reason shown on its page; try again.404Load balancer not found.