Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a list of load balancers external ips in google cloud?

Trying to list all external ips for all load balancers per project in gcp.I know how to list all external ips using the below command but I am trying to filter it somehow and keep only LB's gcloud compute addresses list --filter "NOT addressType:INTERNAL"

New on this this so apologies in advance if my question is not submitted proberly. Any ideas will be helpful.

Thanks

like image 298
Tina Avatar asked Oct 17 '25 11:10

Tina


1 Answers

Each forwarding rule references an IP address and one or more ports on which the load balancer accepts traffic. The forwarding rule also specifies an IP protocol. For Google Cloud load balancers, the IP protocol is always either TCP or UDP.

Depending on the load balancer type, the following is true:

  1. A forwarding rule specifies a backend service, target proxy, or target pool.
  2. A forwarding rule and its IP address are internal or external.

By using below command you can get the Load balancer front-end configured IP addresses

$ gcloud compute forwarding-rules list
like image 109
Priya Gaikwad Avatar answered Oct 22 '25 08:10

Priya Gaikwad



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!