gcloud compute target-pools set-backup
NAME
--backup-pool
BACKUP_POOL
]--failover-ratio
FAILOVER_RATIO
]--format
FORMAT
]--help
]--project
PROJECT_ID
]--quiet
, -q
]--region
REGION
]-h
]gcloud compute target-pools set-backup
is used to set a backup target pool for a primary
target pool, which defines the fallback behavior of the primary
pool. If the ratio of the healthy instances in the primary pool
is at or below the specified --failover-ratio value
, then traffic
arriving at the load-balanced IP address will be directed to the
backup pool.NAME
--backup-pool
[BACKUP_POOL
]
--failover-ratio
FAILOVER_RATIO
--region
REGION
compute/region
property:$ gcloud config set compute/region REGION
$ gcloud compute regions list
$ gcloud config unset compute/region
CLOUDSDK_COMPUTE_REGION
.--format
FORMAT
json
, text
, yaml
.
--help
--project
PROJECT_ID
--quiet
, -q
-h
TARGET-POOL
(in region us-central1
) to fail over
to BACKUP-POOL
when more than half of the TARGET-POOL
instances are unhealthy, run:$ gcloud compute target-pools set-backup TARGET-POOL \ --backup-pool BACKUP-POOL --failover-ratio 0.5 \ --region us-central1
BACKUP-POOL
as a backup to TARGET-POOL
, run:$ gcloud compute target-pools set-backup TARGET-POOL --backup-pool \ --region us-central1
compute
component. See
installing components
if it is not installed.