1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-16 12:22:03 +00:00
gcloud-help/gcloud/network-services/service-lb-policies/create
2024-07-31 09:35:16 +00:00

118 lines
4.5 KiB
Text

NAME
gcloud network-services service-lb-policies create - create a service LB
policy
SYNOPSIS
gcloud network-services service-lb-policies create
(SERVICE_LB_POLICY : --location=LOCATION) [--async]
[--auto-capacity-drain] [--description=DESCRIPTION]
[--failover-health-threshold=FAILOVER_HEALTH_THRESHOLD]
[--load-balancing-algorithm=LOAD_BALANCING_ALGORITHM;
default="waterfall-by-region"] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Create a new service LB policy with the given name.
EXAMPLES
Create a service LB policy with the name 'my-service-lb-policy', load
balancing algorithm 'waterfall-by-region', and location 'global'.
$ gcloud network-services service-lb-policies create \
my-service-lb-policy \
--load-balancing-algorithm=waterfall-by-region \
--location="global"
POSITIONAL ARGUMENTS
Service lb policy resource - Name of the service LB policy to be created.
The arguments in this group can be used to specify the attributes of this
resource. (NOTE) Some attributes are not given arguments in this group but
can be set in other ways.
To set the project attribute:
◆ provide the argument service_lb_policy on the command line with a
fully specified name;
◆ provide the argument --project on the command line;
◆ set the property core/project.
This must be specified.
SERVICE_LB_POLICY
ID of the service lb policy or fully qualified identifier for the
service lb policy.
To set the service_lb_policy attribute:
▸ provide the argument service_lb_policy on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--location=LOCATION
The location Id.
To set the location attribute:
▸ provide the argument service_lb_policy on the command line with a
fully specified name;
▸ provide the argument --location on the command line.
FLAGS
--async
Return immediately, without waiting for the operation in progress to
complete.
--auto-capacity-drain
If specified, an unhealthy MIG/NEG will be removed from Global load
balancing and traffic routing for the service. A MIG/NEG is considered
to be unhealthy if less than 25% of the instance/endpoints in the
MIG/NEG are healthy. autoCapacityDrain will never drain more than 50%
of the configured MIGs/NEGs of a Backend Service.
--description=DESCRIPTION
The description for the service LB policy.
--failover-health-threshold=FAILOVER_HEALTH_THRESHOLD
The percentage threshold that a load balancer will begin to send
traffic to failover backends. If the percentage of endpoints in a
MIG/NEG is smaller than this value, traffic would be sent to failover
backends if possible. This field should be set to a value between 1 and
99. The default value is 50 for Proxyless service mesh, and 70 for
others.
--load-balancing-algorithm=LOAD_BALANCING_ALGORITHM; default="waterfall-by-region"
The global load balancing algorithm to be used.
LOAD_BALANCING_ALGORITHM must be one of:
spray-to-region
Spread the traffic from each client to all the MIGs/NEGs in a
region.
spray-to-world
Balance traffic across all backends across the world proportionally
based on capacity.
waterfall-by-region
Direct traffic to the nearest region with endpoints and capacity
before spilling over to other regions.
waterfall-by-zone
Attempt to keep traffic in a single zone closest to the client,
before spilling over to other zones.
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.
API REFERENCE
This command uses the networkservices/v1 API. The full documentation for
this API can be found at: https://cloud.google.com/networking
NOTES
These variants are also available:
$ gcloud alpha network-services service-lb-policies create
$ gcloud beta network-services service-lb-policies create