1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-10 11:21:48 +00:00
gcloud-help/gcloud/beta/run/services/proxy
2026-04-08 12:08:12 +00:00

113 lines
4.4 KiB
Text

NAME
gcloud beta run services proxy - proxy a service to localhost
authenticating as the active account or with the specified token
SYNOPSIS
gcloud beta run services proxy (SERVICE : --namespace=NAMESPACE)
[--endpoint-mode=ENDPOINT_MODE] [--port=PORT] [--region=REGION]
[--tag=TAG] [--token=TOKEN] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(BETA) Proxy a service to localhost authenticating as the active account or
with the specified token.
EXAMPLES
To proxy the service 'my-service' at localhost port 8080:
$ gcloud beta run services proxy my-service --port=8080
To proxy the existing traffic tag 'my-tag' on the service 'my-service:
$ gcloud beta run services proxy my-service --tag=my-tag
POSITIONAL ARGUMENTS
Service resource - Service to proxy locally. The arguments in this group
can be used to specify the attributes of this resource.
This must be specified.
SERVICE
ID of the service or fully qualified identifier for the service.
To set the service attribute:
▸ provide the argument SERVICE on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--namespace=NAMESPACE
Specific to Cloud Run for Anthos: Kubernetes namespace for the
service.
To set the namespace attribute:
▸ provide the argument SERVICE on the command line with a fully
specified name;
▸ provide the argument --namespace on the command line;
▸ set the property run/namespace;
▸ For Cloud Run on Kubernetes Engine, defaults to "default".
Otherwise, defaults to project ID.;
▸ provide the argument project on the command line;
▸ set the property core/project.
FLAGS
--endpoint-mode=ENDPOINT_MODE
Specifies endpoint mode for a given command. Regional endpoints provide
enhanced data residency and reliability by ensuring your request is
handled entirely within the specified Google Cloud region. This differs
from global endpoints, which may process parts of the request outside
the target region. Overrides the default regional/endpoint_mode
property value for this command invocation. ENDPOINT_MODE must be one
of:
global
(Default) Use global rather than regional endpoints.
regional
Only use regional endpoints. An error will be raised if a regional
endpoint is not available for a given command.
regional-preferred
Use regional endpoints when available, otherwise use global
endpoints. Recommended for most users.
--port=PORT
Local port number to expose the proxied service. If not specified, it
will be set to 8080.
--region=REGION
Region in which the resource can be found. Alternatively, set the
property [run/region].
--tag=TAG
Traffic tag of the service to expose via the proxy. If not specified,
the default service URL will be proxied which may serve different
revisions based on traffic-splits. Custom tags can be used to proxy
specific revisions. Please see
https://cloud.google.com/run/docs/rollouts-rollbacks-traffic-migration#tags.
--token=TOKEN
The specific identity token to add to all requests of the proxied
service. If not specified, the identity token of the currently active
authenticated account will be used (e.g. gcloud auth
print-identity-token).
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.
REGIONAL ENDPOINTS
This command supports regional endpoints. To use regional endpoints for
this command, use the --endpoint-mode=regional-preferred flag. To use
regional endpoints by default, run $ gcloud config set
regional/endpoint_mode regional-preferred.
NOTES
This command is currently in beta and might change without notice. These
variants are also available:
$ gcloud run services proxy
$ gcloud alpha run services proxy