gcloud beta compute target-pools create

NAME
gcloud beta compute target-pools create - define a load-balanced pool of virtual machine instances
SYNOPSIS
gcloud beta compute target-pools createNAME[--backup-pool=BACKUP_POOL][--description=DESCRIPTION][--failover-ratio=FAILOVER_RATIO][--health-check=HEALTH_CHECK][--http-health-check=HTTP_HEALTH_CHECK][--region=REGION][--session-affinity=SESSION_AFFINITY; default="NONE"][GCLOUD_WIDE_FLAG]
DESCRIPTION
(BETA)gcloud beta compute target-pools create is usedto create a target pool. A target pool resource defines a group of instancesthat can receive incoming traffic from forwarding rules. When a forwarding ruledirects traffic to a target pool, Compute Engine picks an instance from thetarget pool based on a hash of the source and destination IP addresses andports. For more information on load balancing, seehttps://cloud.google.com/compute/docs/load-balancing-and-autoscaling/

To add instances to a target pool, use 'gcloud compute target-poolsadd-instances'.

POSITIONAL ARGUMENTS
NAME
The name of the target pool.
FLAGS
--backup-pool=BACKUP_POOL
Together with--failover-ratio, this flagdefines the fallback behavior of the target pool (primary pool) to be created bythis command. If the ratio of the healthy instances in the primary pool is at orbelow the specified--failover-ratio value,then traffic arriving at the load-balanced IP address will be directed to thebackup pool. If this flag is provided, then--failover-ratio is required.
--description=DESCRIPTION
An optional description of this target pool.
--failover-ratio=FAILOVER_RATIO
Together with--backup-pool, defines thefallback behavior of the target pool (primary pool) to be created by thiscommand. If the ratio of the healthy instances in the primary pool is at orbelow this number, traffic arriving at the load-balanced IP address will bedirected to the backup pool. For example, if 0.4 is chosen as the failoverratio, then traffic will fail over to the backup pool if more than 40% of theinstances become unhealthy. If not set, the traffic will be directed theinstances in this pool in theforce mode,where traffic will be spread to the healthy instances with the best effort, orto all instances when no instance is healthy. If this flag is provided, then--backup-pool is required.
--health-check=HEALTH_CHECK
DEPRECATED, use --http-health-check. Specifies an HTTP health check resource touse to determine the health of instances in this pool. If no health check isspecified, traffic will be sent to all instances in this target pool as if theinstances were healthy, but the health status of this pool will appear asunhealthy as a warning that this target pool does not have a health check.
--http-health-check=HTTP_HEALTH_CHECK
Specifies an HTTP health check resource to use to determine the health ofinstances in this pool. If no health check is specified, traffic will be sent toall instances in this target pool as if the instances were healthy, but thehealth status of this pool will appear as unhealthy as a warning that thistarget pool does not have a health check.
--region=REGION
Region of the target pool to create. If not specified, you might be prompted toselect a region (interactive mode only).

To avoid prompting when this flag is omitted, you can set thecompute/region property:

gcloudconfigsetcompute/regionREGION

A list of regions can be fetched by running:

gcloudcomputeregionslist

To unset the property, run:

gcloudconfigunsetcompute/region

Alternatively, the region can be stored in the environment variableCLOUDSDK_COMPUTE_REGION.

--session-affinity=SESSION_AFFINITY; default="NONE"
The type of session affinity to use. Supports both TCP and UDP.SESSION_AFFINITY must be one of:
CLIENT_IP
Route requests to instances based on the hash of the client's IP address.
CLIENT_IP_PROTO
Connections from the same client IP with the same IP protocol will go to thesame VM in the pool while that VM remains healthy.
NONE
Session affinity is disabled.
GCLOUD WIDE FLAGS
These flags are available to all commands:--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.

Run$gcloud help for details.

NOTES
This command is currently in beta and might change without notice. Thesevariants are also available:
gcloudcomputetarget-poolscreate
gcloudalphacomputetarget-poolscreate

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-05-07 UTC.