2470
|
1 |
|
|
2 |
==============
|
|
3 |
Google Cloud
|
|
4 |
==============
|
|
5 |
|
|
6 |
Load balancer
|
|
7 |
=============
|
|
8 |
|
2472
|
9 |
https://cloud.google.com/load-balancing/docs/https/traffic-management
|
|
10 |
Traffic management overview for external HTTP(S) load balancers.
|
2470
|
11 |
https://cloud.google.com/compute/docs/reference/rest/v1/urlMaps
|
|
12 |
URL map API.
|
|
13 |
|
2471
|
14 |
Health check
|
|
15 |
============
|
|
16 |
|
|
17 |
List health checks::
|
|
18 |
|
|
19 |
gcloud compute health-checks list --format=yaml
|
|
20 |
|
|
21 |
In order for LB to function you need to define health checks. They run outside of intranet so
|
|
22 |
firewall rules have to be applied to VMs for checks to succeed::
|
|
23 |
|
|
24 |
gcloud compute firewall-rules create fw-allow-health-check \
|
|
25 |
--network=default \
|
|
26 |
--action=allow \
|
|
27 |
--direction=ingress \
|
|
28 |
--source-ranges=130.211.0.0/22,35.191.0.0/16 \
|
|
29 |
--target-tags=allow-health-check \
|
|
30 |
--rules=tcp:80
|
|
31 |
|
|
32 |
https://cloud.google.com/load-balancing/docs/health-checks
|
|
33 |
Creating health checks & magical subnets for FW rules.
|
|
34 |
|