gcloud.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Fri, 18 Dec 2020 18:28:04 +0200
changeset 2475 547fe18869f4
parent 2474 cc7945bce35e
child 2476 9dcca871e859
permissions -rw-r--r--
URL map API.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2470
6815c2cba7a1 URL map API.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     1
6815c2cba7a1 URL map API.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     2
==============
6815c2cba7a1 URL map API.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
 Google Cloud
6815c2cba7a1 URL map API.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     4
==============
6815c2cba7a1 URL map API.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     5
6815c2cba7a1 URL map API.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     6
Load balancer
6815c2cba7a1 URL map API.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     7
=============
6815c2cba7a1 URL map API.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     8
2472
68f8ff9f6c26 Added link.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2471
diff changeset
     9
https://cloud.google.com/load-balancing/docs/https/traffic-management
68f8ff9f6c26 Added link.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2471
diff changeset
    10
  Traffic management overview for external HTTP(S) load balancers.
2470
6815c2cba7a1 URL map API.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    11
https://cloud.google.com/compute/docs/reference/rest/v1/urlMaps
6815c2cba7a1 URL map API.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    12
  URL map API.
2475
547fe18869f4 URL map API.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2474
diff changeset
    13
https://cloud.google.com/compute/docs/reference/rest/v1/regionUrlMaps
547fe18869f4 URL map API.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2474
diff changeset
    14
  URL map API.
2470
6815c2cba7a1 URL map API.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    15
2471
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    16
Health check
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    17
============
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    18
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    19
List health checks::
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    20
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    21
  gcloud compute health-checks list --format=yaml
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    22
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    23
In order for LB to function you need to define health checks. They run outside of intranet so
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    24
firewall rules have to be applied to VMs for checks to succeed::
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    25
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    26
  gcloud compute firewall-rules create fw-allow-health-check \
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    27
    --network=default \
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    28
    --action=allow \
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    29
    --direction=ingress \
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    30
    --source-ranges=130.211.0.0/22,35.191.0.0/16 \
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    31
    --target-tags=allow-health-check \
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    32
    --rules=tcp:80
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    33
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    34
https://cloud.google.com/load-balancing/docs/health-checks
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    35
  Creating health checks & magical subnets for FW rules.
6164ab8d6b1a Health check.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2470
diff changeset
    36
2473
d11ed0a51261 SSL certificates.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2472
diff changeset
    37
SSL certificates
d11ed0a51261 SSL certificates.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2472
diff changeset
    38
================
d11ed0a51261 SSL certificates.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2472
diff changeset
    39
d11ed0a51261 SSL certificates.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2472
diff changeset
    40
To view status and error details run::
d11ed0a51261 SSL certificates.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2472
diff changeset
    41
d11ed0a51261 SSL certificates.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2472
diff changeset
    42
  gcloud beta compute ssl-certificates describe $NAME
d11ed0a51261 SSL certificates.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2472
diff changeset
    43
  gcloud beta compute ssl-certificates list --format=yaml
d11ed0a51261 SSL certificates.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2472
diff changeset
    44
d11ed0a51261 SSL certificates.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2472
diff changeset
    45
and check codes against:
d11ed0a51261 SSL certificates.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2472
diff changeset
    46
d11ed0a51261 SSL certificates.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2472
diff changeset
    47
https://cloud.google.com/load-balancing/docs/ssl-certificates/troubleshooting
d11ed0a51261 SSL certificates.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2472
diff changeset
    48
  Troubleshooting SSL certificates. Error codes description.
d11ed0a51261 SSL certificates.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2472
diff changeset
    49
2474
cc7945bce35e Using self-managed SSL certificates.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2473
diff changeset
    50
To set manages sertificate follow instructions:
2473
d11ed0a51261 SSL certificates.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2472
diff changeset
    51
2474
cc7945bce35e Using self-managed SSL certificates.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2473
diff changeset
    52
https://cloud.google.com/load-balancing/docs/ssl-certificates/self-managed-certs
cc7945bce35e Using self-managed SSL certificates.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2473
diff changeset
    53
  Using self-managed SSL certificates.
cc7945bce35e Using self-managed SSL certificates.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2473
diff changeset
    54