gcloud compute forwarding-rules create
NAME
(--backend-service
=BACKEND_SERVICE
| --target-google-apis-bundle
=TARGET_GOOGLE_APIS_BUNDLE
| --target-grpc-proxy
=TARGET_GRPC_PROXY
| --target-http-proxy
=TARGET_HTTP_PROXY
| --target-https-proxy
=TARGET_HTTPS_PROXY
| --target-instance
=TARGET_INSTANCE
| --target-pool
=TARGET_POOL
| --target-service-attachment
=TARGET_SERVICE_ATTACHMENT
| --target-ssl-proxy
=TARGET_SSL_PROXY
| --target-tcp-proxy
=TARGET_TCP_PROXY
| --target-vpn-gateway
=TARGET_VPN_GATEWAY
) [--address
=ADDRESS
] [--allow-global-access
] [--allow-psc-global-access
] [--description
=DESCRIPTION
] [--disable-automate-dns-zone
] [--ip-collection
=IP_COLLECTION
] [--ip-collection-region
=IP_COLLECTION_REGION
] [--ip-protocol
=IP_PROTOCOL
] [--ip-version
=IP_VERSION
] [--is-mirroring-collector
] [--load-balancing-scheme
=LOAD_BALANCING_SCHEME
] [--network
=NETWORK
] [--network-tier
=NETWORK_TIER
] [--service-directory-registration
=SERVICE_DIRECTORY_REGISTRATION
] [--service-label
=SERVICE_LABEL
] [--source-ip-ranges
=SOURCE_IP_RANGE
,[…]] [--subnet
=SUBNET
] [--subnet-region
=SUBNET_REGION
] [--target-instance-zone
=TARGET_INSTANCE_ZONE
] [--target-pool-region
=TARGET_POOL_REGION
] [--target-service-attachment-region
=TARGET_SERVICE_ATTACHMENT_REGION
] [--target-vpn-gateway-region
=TARGET_VPN_GATEWAY_REGION
] [--address-region
=ADDRESS_REGION
| --global-address
] [--backend-service-region
=BACKEND_SERVICE_REGION
| --global-backend-service
] [--global
| --region
=REGION
] [--global-target-http-proxy
| --target-http-proxy-region
=TARGET_HTTP_PROXY_REGION
] [--global-target-https-proxy
| --target-https-proxy-region
=TARGET_HTTPS_PROXY_REGION
] [--global-target-tcp-proxy
| --target-tcp-proxy-region
=TARGET_TCP_PROXY_REGION
] [--port-range
=[PORT
| START_PORT-END_PORT
] | --ports
=ALL
| [PORT
| START_PORT-END_PORT
],[…]] [GCLOUD_WIDE_FLAG …
]
gcloud compute forwarding-rules create
is used to create a forwarding rule. A forwarding rule directs traffic that matches a destination IP address (and possibly a TCP or UDP port) to a forwarding target (load balancer, VPN gateway or VM instance).
Forwarding rules can be either global or regional, specified with the
or --global
flags. For more information about the scope of a forwarding rule, refer to https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts.--region=REGION
Forwarding rules can be external, internal, internal managed, or internal self-managed, specified with the
flag. External forwarding rules are accessible from the internet, while internal forwarding rules are only accessible from within their VPC networks. You can specify a reserved static external or internal IP address with the --load-balancing-scheme=[EXTERNAL|EXTERNAL_MANAGED|INTERNAL|INTERNAL_MANAGED|INTERNAL_SELF_MANAGED]
flag for the forwarding rule. Otherwise, if the flag is unspecified, an ephemeral IP address is automatically assigned (global IP addresses for global forwarding rules and regional IP addresses for regional forwarding rules); an internal forwarding rule is automatically assigned an ephemeral internal IP address from the subnet specified with the --address=ADDRESS
flag. You must provide an IP address for an internal self-managed forwarding rule.--subnet
Different types of load balancers work at different layers of the OSI networking model (http://en.wikipedia.org/wiki/Network_layer). Layer 3/4 targets include target pools, target SSL proxies, target TCP proxies, and backend services. Layer 7 targets include target HTTP proxies and target HTTPS proxies. For more information, refer to https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts. When creating a forwarding rule, exactly one of
, --target-instance
, --target-pool
, --target-http-proxy
, --target-https-proxy
, --target-grpc-proxy
, --target-ssl-proxy
, --target-tcp-proxy
, --target-vpn-gateway
or --backend-service
must be specified.--target-google-apis-bundle
gcloud compute forwarding-rules create RULE_NAME --global --target-http-proxy=PROXY --ports=8080 --address=ADDRESS
To create a regional forwarding rule for the subnet SUBNET_NAME on the default network that will forward all traffic on ports 80-82 to a backend service SERVICE_NAME, run:
gcloud compute forwarding-rules create RULE_NAME --load-balancing-scheme=INTERNAL --backend-service=SERVICE_NAME --subnet=SUBNET_NAME --network=default --region=REGION --ports=80-82
NAME
--backend-service
=BACKEND_SERVICE
--target-google-apis-bundle
=TARGET_GOOGLE_APIS_BUNDLE
--target-grpc-proxy
=TARGET_GRPC_PROXY
--target-http-proxy
=TARGET_HTTP_PROXY
--target-https-proxy
=TARGET_HTTPS_PROXY
--target-instance
=TARGET_INSTANCE
compute/zone
property isn't set, you might be prompted to select a zone (interactive mode only).
To avoid prompting when this flag is omitted, you can set the
property:compute/zone
gcloud config set compute/zone ZONE
A list of zones can be fetched by running:
gcloud compute zones list
To unset the property, run:
gcloud config unset compute/zone
Alternatively, the zone can be stored in the environment variable
.CLOUDSDK_COMPUTE_ZONE
--target-pool
=TARGET_POOL
--target-service-attachment
=TARGET_SERVICE_ATTACHMENT
--target-ssl-proxy
=TARGET_SSL_PROXY
--target-tcp-proxy
=TARGET_TCP_PROXY
--target-vpn-gateway
=TARGET_VPN_GATEWAY
--address
=ADDRESS
If you don't specify a reserved IP address, an ephemeral IP address is assigned. You can specify the IP address as a literal IP address or as a reference to an existing Address resource. The following examples are all valid:
The load-balancing-scheme (EXTERNAL, EXTERNAL_MANAGED, INTERNAL, INTERNAL_SELF_MANAGED, INTERNAL_MANAGED) and the target of the forwarding rule determine the type of IP address that you can use. The address type must be external for load-balancing-scheme EXTERNAL or EXTERNAL_MANAGED. For other load-balancing-schemes, the address type must be internal. For detailed information, refer to https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications.
--allow-global-access
--allow-psc-global-access
--description
=DESCRIPTION
--disable-automate-dns-zone
--target-service-attachment=SERVICE_ATTACHMENT
) or Google APIs bundle (--target-google-apis-bundle=API_BUNDLE
)
--ip-collection
=IP_COLLECTION
--ip-collection-region
=IP_COLLECTION_REGION
compute/region
property value for this command invocation.
--ip-protocol
=IP_PROTOCOL
TCP
.
Note that if the load-balancing scheme is INTERNAL
, the protocol must be one of: TCP
, UDP
, L3_DEFAULT
.
For a load-balancing scheme that is EXTERNAL
, all IP_PROTOCOL options are valid.
IP_PROTOCOL
must be one of: AH
, ESP
, ICMP
, SCTP
, TCP
, UDP
, L3_DEFAULT
.
--ip-version
=IP_VERSION
IP_VERSION
must be one of: IPV4
, IPV6
.
--is-mirroring-collector
--load-balancing-scheme
=LOAD_BALANCING_SCHEME
LOAD_BALANCING_SCHEME
must be one of:
EXTERNAL
EXTERNAL_MANAGED
INTERNAL
INTERNAL_MANAGED
INTERNAL_SELF_MANAGED
--network
=NETWORK
--network-tier
=NETWORK_TIER
NETWORK_TIER
must be one of: PREMIUM
, STANDARD
. The default value is PREMIUM
.
--service-directory-registration
=SERVICE_DIRECTORY_REGISTRATION
--service-label
=SERVICE_LABEL
--service-label
flag if the forwarding rule references an internal IP address that has the --purpose=SHARED_LOADBALANCER_VIP
flag set.
--source-ip-ranges
=SOURCE_IP_RANGE
,[…]
--subnet
=SUBNET
--subnet-region
=SUBNET_REGION
compute/region
property value for this command invocation.
--target-instance-zone
=TARGET_INSTANCE_ZONE
compute/zone
property value for this command invocation.
--target-pool-region
=TARGET_POOL_REGION
compute/region
property value for this command invocation.
--target-service-attachment-region
=TARGET_SERVICE_ATTACHMENT_REGION
To avoid prompting when this flag is omitted, you can set the
property:compute/region
gcloud config set compute/region REGION
A list of regions can be fetched by running:
gcloud compute regions list
To unset the property, run:
gcloud config unset compute/region
Alternatively, the region can be stored in the environment variable
.CLOUDSDK_COMPUTE_REGION
--target-vpn-gateway-region
=TARGET_VPN_GATEWAY_REGION
compute/region
property value for this command invocation.
--address-region
=ADDRESS_REGION
To avoid prompting when this flag is omitted, you can set the
property:compute/region
gcloud config set compute/region REGION
A list of regions can be fetched by running:
gcloud compute regions list
To unset the property, run:
gcloud config unset compute/region
Alternatively, the region can be stored in the environment variable
.CLOUDSDK_COMPUTE_REGION
--global-address
--backend-service-region
=BACKEND_SERVICE_REGION
compute/region
property value for this command invocation.
--global-backend-service
--global
--region
=REGION
To avoid prompting when this flag is omitted, you can set the
property:compute/region
gcloud config set compute/region REGION
A list of regions can be fetched by running:
gcloud compute regions list
To unset the property, run:
gcloud config unset compute/region
Alternatively, the region can be stored in the environment variable
.CLOUDSDK_COMPUTE_REGION
--global-target-http-proxy
--target-http-proxy-region
=TARGET_HTTP_PROXY_REGION
To avoid prompting when this flag is omitted, you can set the
property:compute/region
gcloud config set compute/region REGION
A list of regions can be fetched by running:
gcloud compute regions list
To unset the property, run:
gcloud config unset compute/region
Alternatively, the region can be stored in the environment variable
.CLOUDSDK_COMPUTE_REGION
--global-target-https-proxy
--target-https-proxy-region
=TARGET_HTTPS_PROXY_REGION
To avoid prompting when this flag is omitted, you can set the
property:compute/region
gcloud config set compute/region REGION
A list of regions can be fetched by running:
gcloud compute regions list
To unset the property, run:
gcloud config unset compute/region
Alternatively, the region can be stored in the environment variable
.CLOUDSDK_COMPUTE_REGION
--global-target-tcp-proxy
--target-tcp-proxy-region
=TARGET_TCP_PROXY_REGION
To avoid prompting when this flag is omitted, you can set the
property:compute/region
gcloud config set compute/region REGION
A list of regions can be fetched by running:
gcloud compute regions list
To unset the property, run:
gcloud config unset compute/region
Alternatively, the region can be stored in the environment variable
.CLOUDSDK_COMPUTE_REGION
--port-range
=[PORT
| START_PORT-END_PORT
]
--ports
=ALL
| [PORT
| START_PORT-END_PORT
],[…]
--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.
gcloud alpha compute forwarding-rules create
gcloud beta compute forwarding-rules create
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4