After you set up a load balancer, you can delete the resources that you made so that you aren't billed for them in the future. If these resources were created within their own project, you can delete the entire project. Otherwise, you can delete the resources individually.
Deleting the project
Console
In the Google Cloud console, go to the Projects page.
In the project list, select the project that you want to delete, and then click
Delete.In the dialog, type the
PROJECT_ID
, and then click Shut down to delete the project.
gcloud
Run the following command, replacing PROJECT_ID
with your
project ID:
gcloud projects delete PROJECT_ID
Deleting individual resources
Deleting the load balancer
In the Google Cloud console, go to the Load balancing page.
Select the checkbox next to your load balancer name.
At the top of the page, click
Delete.Select the checkboxes next to all the additional resources, including backend services, backend buckets, health checks, and SSL certificates.
Click Delete load balancer and the selected resources.
Deleting the Cloud Storage buckets
If you created backend buckets, deleting the load balancer and backend buckets doesn't delete the underlying Cloud Storage buckets or the objects contained within them.
For information about deleting Cloud Storage buckets and the objects contained within them, see Deleting buckets.
Deleting the instance groups
If you created instance groups, delete them. Deleting the instance group also deletes the individual VMs.
In the Google Cloud console, go to the Instance groups page.
To select all instance groups, select the checkbox next to Name, and then click
Delete.In the confirmation window, click
Delete.
Deleting the VM instances
If you created standalone VM instances, delete them.
In the Google Cloud console, go to the VM instances page.
Select the checkbox next to Name to select all instances, and then click
Delete.In the confirmation window, click
Delete.
Deleting the NEGs
If you created any network endpoint groups (NEGs), delete them. Deleting a NEG also deletes network endpoints contained in the NEG.
In the Google Cloud console, go to the Network Endpoint Groups page.
Locate the network endpoint group that you want to delete.
In that row, click
Delete.
Releasing reserved IP addresses
If your load balancer uses one or more a reserved IP addresses, make sure you delete them.
In the Google Cloud console, go to the External IP addresses page.
Select the checkboxes next to your reserved IP addresses.
Click Release static address.
In the confirmation window, click
Delete.
Deleting the VPC network
If you created a custom VPC network, delete it. Deleting a VPC network also deletes its subnetworks, routes, and firewall rules.
In the Google Cloud console, go to the VPC networks page.
Click your custom VPC network.
On the network details page, click Delete VPC network.
In the confirmation window, click
Delete.
Deleting custom firewall rules in the default VPC network
If you created custom firewall rules in the default VPC network, delete them.
In the Google Cloud console, go to the Firewall policies page.
Select the checkboxes next to your custom firewall rules.
Click
Delete.In the confirmation window, click
Delete.