changeset 2471:6164ab8d6b1a

Health check.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Fri, 18 Dec 2020 17:46:33 +0200
parents 6815c2cba7a1
children 68f8ff9f6c26
files gcloud.rst
diffstat 1 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gcloud.rst	Fri Dec 18 17:33:30 2020 +0200
+++ b/gcloud.rst	Fri Dec 18 17:46:33 2020 +0200
@@ -9,3 +9,24 @@
 https://cloud.google.com/compute/docs/reference/rest/v1/urlMaps
   URL map API.
 
+Health check
+============
+
+List health checks::
+
+  gcloud compute health-checks list --format=yaml
+
+In order for LB to function you need to define health checks. They run outside of intranet so
+firewall rules have to be applied to VMs for checks to succeed::
+
+  gcloud compute firewall-rules create fw-allow-health-check \
+    --network=default \
+    --action=allow \
+    --direction=ingress \
+    --source-ranges=130.211.0.0/22,35.191.0.0/16 \
+    --target-tags=allow-health-check \
+    --rules=tcp:80
+
+https://cloud.google.com/load-balancing/docs/health-checks
+  Creating health checks & magical subnets for FW rules.
+