问题
How can I configure Google cloud internal HTTP(S) Load Balancing to listen on HTTP and HTTPS with the same internal frontend IP.
I get this error when trying: IP 'XX.XX.XX.XX' is already being used by another resource.
note, on external HTTP/S load balancing it works perfect.
回答1:
You can create more than one frontend for an Internal Load Balancer using different IPs, but you cannot use the same IP for more than one frontend.
As per Internal l7LB limitations “Within each VPC network, each internal managed forwarding rule must have its own IP address.”
See also this article to confirm the following:
If the forwarding rule's load balancing scheme is one of the following, it must have a unique IP address:
- INTERNAL for internal TCP/UDP load balancers
- INTERNAL_MANAGED for internal HTTP(S) load balancers
- INTERNAL_SELF_MANAGED for Traffic Director
For this specific scenario, I would recommend using this link and report it as a Feature Request.
As a workaround, if you don’t have the requirement of an HTTP LB, you can always use a TCP/UDP Internal Load Balancer, with which you can choose between use up to five different ports for the same IP, or use all ports, details here
“An internal forwarding rule that supports either all TCP ports or all UDP ports allows backend VMs to run multiple applications, each on its own port. Traffic sent to a given port is delivered to the corresponding application, and all applications use the same IP address.”
I hope this helps.
来源:https://stackoverflow.com/questions/60359992/frontend-ip-listen-on-http-and-https-on-google-cloud-internal-https-load-balan