mirror of
https://github.com/imjasonh/gcloud-help
synced 2026-07-20 04:58:26 +00:00
gcloud: Tue Mar 1 04:29:52 UTC 2022
This commit is contained in:
parent
aab53307a8
commit
1456dab6c7
9791 changed files with 814712 additions and 0 deletions
217
gcloud/beta/run/services/add-iam-policy-binding
Normal file
217
gcloud/beta/run/services/add-iam-policy-binding
Normal file
|
|
@ -0,0 +1,217 @@
|
|||
NAME
|
||||
gcloud beta run services add-iam-policy-binding - add IAM policy binding to
|
||||
a Cloud Run service
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta run services add-iam-policy-binding SERVICE --member=PRINCIPAL
|
||||
--role=ROLE [--platform=PLATFORM; default="managed"]
|
||||
[--condition=[KEY=VALUE,...]
|
||||
| --condition-from-file=CONDITION_FROM_FILE]
|
||||
[--region=REGION
|
||||
| --cluster=CLUSTER --cluster-location=CLUSTER_LOCATION
|
||||
| --context=CONTEXT --kubeconfig=KUBECONFIG] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) Add an IAM policy binding to the IAM policy of a Cloud Run service.
|
||||
One binding consists of a member, a role, and an optional condition.
|
||||
|
||||
EXAMPLES
|
||||
To add an IAM policy binding for the role of 'roles/run.invoker' for the
|
||||
user 'test-user@gmail.com' with service 'my-service' and region
|
||||
'us-central1', run:
|
||||
|
||||
$ gcloud beta run services add-iam-policy-binding my-service \
|
||||
--region='us-central1' --member='user:test-user@gmail.com' \
|
||||
--role='roles/run.invoker'
|
||||
|
||||
To add an IAM policy binding which expires at the end of the year 2019 for
|
||||
the role of 'roles/run.invoker' and the user 'test-user@gmail.com' with
|
||||
service 'my-service' and region 'us-central1', run:
|
||||
|
||||
$ gcloud beta run services add-iam-policy-binding my-service \
|
||||
--region='us-central1' --member='user:test-user@gmail.com' \
|
||||
--role='roles/run.invoker' \
|
||||
--condition='expression=request.time <
|
||||
timestamp("2020-01-01T00:00:00Z"),title=expires_end_of_2019,descrip\
|
||||
tion=Expires at midnight on 2019-12-31'
|
||||
|
||||
See https://cloud.google.com/iam/docs/managing-policies for details of
|
||||
policy role and member types.
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Service resource - The service for which to add IAM policy binding to.
|
||||
This represents a Cloud 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 on the command line with a fully
|
||||
specified name;
|
||||
◆ set the property core/project;
|
||||
◆ provide the argument --project on the command line. To set the region
|
||||
attribute:
|
||||
◆ provide the argument service on the command line with a fully
|
||||
specified name;
|
||||
◆ provide the argument --region on the command line;
|
||||
◆ set the property run/region;
|
||||
◆ specify from a list of available regions in a prompt.
|
||||
|
||||
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.
|
||||
|
||||
REQUIRED FLAGS
|
||||
--member=PRINCIPAL
|
||||
The principal to add the binding for. Should be of the form
|
||||
user|group|serviceAccount:email or domain:domain.
|
||||
|
||||
Examples: user:test-user@gmail.com, group:admins@example.com,
|
||||
serviceAccount:test123@example.domain.com, or
|
||||
domain:example.domain.com.
|
||||
|
||||
Some resources also accept the following special values:
|
||||
◆ allUsers - Special identifier that represents anyone who is on the
|
||||
internet, with or without a Google account.
|
||||
◆ allAuthenticatedUsers - Special identifier that represents anyone
|
||||
who is authenticated with a Google account or a service account.
|
||||
|
||||
--role=ROLE
|
||||
Role name to assign to the principal. The role name is the complete
|
||||
path of a predefined role, such as roles/logging.viewer, or the role ID
|
||||
for a custom role, such as
|
||||
organizations/{ORGANIZATION_ID}/roles/logging.viewer.
|
||||
|
||||
OPTIONAL FLAGS
|
||||
--platform=PLATFORM; default="managed"
|
||||
Target platform for running commands. Alternatively, set the property
|
||||
[run/platform]. PLATFORM must be one of:
|
||||
|
||||
managed
|
||||
Fully managed version of Cloud Run. Use with the --region flag or
|
||||
set the [run/region] property to specify a Cloud Run region.
|
||||
gke
|
||||
Cloud Run for Anthos on Google Cloud. Use with the --cluster and
|
||||
--cluster-location flags or set the [run/cluster] and
|
||||
[run/cluster_location] properties to specify a cluster in a given
|
||||
zone.
|
||||
kubernetes
|
||||
Use a Knative-compatible kubernetes cluster. Use with the
|
||||
--kubeconfig and --context flags to specify a kubeconfig file and
|
||||
the context for connecting.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--condition=[KEY=VALUE,...]
|
||||
A condition to include in the binding. When the condition is
|
||||
explicitly specified as None (--condition=None), a binding without a
|
||||
condition is added. When the condition is specified and is not None,
|
||||
--role cannot be a basic role. Basic roles are roles/editor,
|
||||
roles/owner, and roles/viewer. For more on conditions, refer to the
|
||||
conditions overview guide:
|
||||
https://cloud.google.com/iam/docs/conditions-overview
|
||||
|
||||
When using the --condition flag, include the following key-value
|
||||
pairs:
|
||||
|
||||
expression
|
||||
(Required) Condition expression that evaluates to True or False.
|
||||
This uses a subset of Common Expression Language syntax.
|
||||
|
||||
If the condition expression includes a comma, use a different
|
||||
delimiter to separate the key-value pairs. Specify the delimiter
|
||||
before listing the key-value pairs. For example, to specify a
|
||||
colon (:) as the delimiter, do the following:
|
||||
--condition=^:^title=TITLE:expression=EXPRESSION. For more
|
||||
information, see
|
||||
https://cloud.google.com/sdk/gcloud/reference/topic/escaping.
|
||||
|
||||
title
|
||||
(Required) A short string describing the purpose of the
|
||||
expression.
|
||||
|
||||
description
|
||||
(Optional) Additional description for the expression.
|
||||
|
||||
--condition-from-file=CONDITION_FROM_FILE
|
||||
Path to a local JSON or YAML file that defines the condition. To see
|
||||
available fields, see the help for --condition.
|
||||
|
||||
Arguments to locate resources, depending on the platform used.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
Only applicable if connecting to Cloud Run (fully managed). Specify
|
||||
--platform=managed to use:
|
||||
|
||||
--region=REGION
|
||||
Region in which the resource can be found. Alternatively, set the
|
||||
property [run/region].
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on Google
|
||||
Cloud. Specify --platform=gke to use:
|
||||
|
||||
Cluster resource - Kubernetes Engine cluster to connect to. 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 --cluster on the command line with a fully
|
||||
specified name;
|
||||
▫ set the property run/cluster with a fully specified name;
|
||||
▫ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
▫ provide the argument --project on the command line;
|
||||
▫ set the property core/project.
|
||||
|
||||
--cluster=CLUSTER
|
||||
ID of the cluster or fully qualified identifier for the cluster.
|
||||
To set the cluster attribute:
|
||||
◇ provide the argument --cluster on the command line;
|
||||
◇ set the property run/cluster;
|
||||
◇ specify the cluster from a list of available clusters.
|
||||
|
||||
--cluster-location=CLUSTER_LOCATION
|
||||
Zone in which the cluster is located. Alternatively, set the
|
||||
property [run/cluster_location]. To set the location attribute:
|
||||
◇ provide the argument --cluster on the command line with a
|
||||
fully specified name;
|
||||
◇ set the property run/cluster with a fully specified name;
|
||||
◇ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
◇ provide the argument --cluster-location on the command line;
|
||||
◇ set the property run/cluster_location;
|
||||
◇ specify the cluster location from a list of available zones.
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on
|
||||
VMware. Specify --platform=kubernetes to use:
|
||||
|
||||
--context=CONTEXT
|
||||
The name of the context in your kubectl config file to use for
|
||||
connecting.
|
||||
|
||||
--kubeconfig=KUBECONFIG
|
||||
The absolute path to your kubectl config file. If not specified,
|
||||
the colon- or semicolon-delimited list of paths specified by
|
||||
$KUBECONFIG will be used. If $KUBECONFIG is unset, this defaults to
|
||||
~/.kube/config.
|
||||
|
||||
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 run/v1 API. The full documentation for this API can
|
||||
be found at: https://cloud.google.com/run/
|
||||
|
||||
NOTES
|
||||
This command is currently in beta and might change without notice. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud run services add-iam-policy-binding
|
||||
|
||||
$ gcloud alpha run services add-iam-policy-binding
|
||||
|
||||
142
gcloud/beta/run/services/delete
Normal file
142
gcloud/beta/run/services/delete
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
NAME
|
||||
gcloud beta run services delete - delete a service
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta run services delete (SERVICE : --namespace=NAMESPACE)
|
||||
[--[no-]async] [--platform=PLATFORM; default="managed"]
|
||||
[--region=REGION
|
||||
| --cluster=CLUSTER --cluster-location=CLUSTER_LOCATION
|
||||
| --context=CONTEXT --kubeconfig=KUBECONFIG] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) Delete a service.
|
||||
|
||||
EXAMPLES
|
||||
To delete a service:
|
||||
|
||||
$ gcloud beta run services delete <service-name>
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Service resource - Service to delete. 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 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
|
||||
--[no-]async
|
||||
Return immediately, without waiting for the operation in progress to
|
||||
complete. Defaults to --no-async for Cloud Run (fully managed) and
|
||||
--async for Cloud Run for Anthos. Use --async to enable and --no-async
|
||||
to disable.
|
||||
|
||||
--platform=PLATFORM; default="managed"
|
||||
Target platform for running commands. Alternatively, set the property
|
||||
[run/platform]. PLATFORM must be one of:
|
||||
|
||||
managed
|
||||
Fully managed version of Cloud Run. Use with the --region flag or
|
||||
set the [run/region] property to specify a Cloud Run region.
|
||||
gke
|
||||
Cloud Run for Anthos on Google Cloud. Use with the --cluster and
|
||||
--cluster-location flags or set the [run/cluster] and
|
||||
[run/cluster_location] properties to specify a cluster in a given
|
||||
zone.
|
||||
kubernetes
|
||||
Use a Knative-compatible kubernetes cluster. Use with the
|
||||
--kubeconfig and --context flags to specify a kubeconfig file and
|
||||
the context for connecting.
|
||||
|
||||
Arguments to locate resources, depending on the platform used.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
Only applicable if connecting to Cloud Run (fully managed). Specify
|
||||
--platform=managed to use:
|
||||
|
||||
--region=REGION
|
||||
Region in which the resource can be found. Alternatively, set the
|
||||
property [run/region].
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on Google
|
||||
Cloud. Specify --platform=gke to use:
|
||||
|
||||
Cluster resource - Kubernetes Engine cluster to connect to. 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 --cluster on the command line with a fully
|
||||
specified name;
|
||||
▫ set the property run/cluster with a fully specified name;
|
||||
▫ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
▫ provide the argument --project on the command line;
|
||||
▫ set the property core/project.
|
||||
|
||||
--cluster=CLUSTER
|
||||
ID of the cluster or fully qualified identifier for the cluster.
|
||||
To set the cluster attribute:
|
||||
◇ provide the argument --cluster on the command line;
|
||||
◇ set the property run/cluster;
|
||||
◇ specify the cluster from a list of available clusters.
|
||||
|
||||
--cluster-location=CLUSTER_LOCATION
|
||||
Zone in which the cluster is located. Alternatively, set the
|
||||
property [run/cluster_location]. To set the location attribute:
|
||||
◇ provide the argument --cluster on the command line with a
|
||||
fully specified name;
|
||||
◇ set the property run/cluster with a fully specified name;
|
||||
◇ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
◇ provide the argument --cluster-location on the command line;
|
||||
◇ set the property run/cluster_location;
|
||||
◇ specify the cluster location from a list of available zones.
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on
|
||||
VMware. Specify --platform=kubernetes to use:
|
||||
|
||||
--context=CONTEXT
|
||||
The name of the context in your kubectl config file to use for
|
||||
connecting.
|
||||
|
||||
--kubeconfig=KUBECONFIG
|
||||
The absolute path to your kubectl config file. If not specified,
|
||||
the colon- or semicolon-delimited list of paths specified by
|
||||
$KUBECONFIG will be used. If $KUBECONFIG is unset, this defaults to
|
||||
~/.kube/config.
|
||||
|
||||
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. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud run services delete
|
||||
|
||||
$ gcloud alpha run services delete
|
||||
|
||||
145
gcloud/beta/run/services/describe
Normal file
145
gcloud/beta/run/services/describe
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
NAME
|
||||
gcloud beta run services describe - obtain details about a given service
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta run services describe (SERVICE : --namespace=NAMESPACE)
|
||||
[--platform=PLATFORM; default="managed"]
|
||||
[--region=REGION
|
||||
| --cluster=CLUSTER --cluster-location=CLUSTER_LOCATION
|
||||
| --context=CONTEXT --kubeconfig=KUBECONFIG] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) Obtain details about a given service.
|
||||
|
||||
EXAMPLES
|
||||
To obtain details about a given service:
|
||||
|
||||
$ gcloud beta run services describe <service-name>
|
||||
|
||||
To get those details in the YAML format:
|
||||
|
||||
$ gcloud beta run services describe <service-name> --format=yaml
|
||||
|
||||
To get them in YAML format suited to export (omitting metadata specific to
|
||||
this deployment and status info):
|
||||
|
||||
$ gcloud beta run services describe <service-name> --format=export
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Service resource - Service to describe. 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 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
|
||||
--platform=PLATFORM; default="managed"
|
||||
Target platform for running commands. Alternatively, set the property
|
||||
[run/platform]. PLATFORM must be one of:
|
||||
|
||||
managed
|
||||
Fully managed version of Cloud Run. Use with the --region flag or
|
||||
set the [run/region] property to specify a Cloud Run region.
|
||||
gke
|
||||
Cloud Run for Anthos on Google Cloud. Use with the --cluster and
|
||||
--cluster-location flags or set the [run/cluster] and
|
||||
[run/cluster_location] properties to specify a cluster in a given
|
||||
zone.
|
||||
kubernetes
|
||||
Use a Knative-compatible kubernetes cluster. Use with the
|
||||
--kubeconfig and --context flags to specify a kubeconfig file and
|
||||
the context for connecting.
|
||||
|
||||
Arguments to locate resources, depending on the platform used.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
Only applicable if connecting to Cloud Run (fully managed). Specify
|
||||
--platform=managed to use:
|
||||
|
||||
--region=REGION
|
||||
Region in which the resource can be found. Alternatively, set the
|
||||
property [run/region].
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on Google
|
||||
Cloud. Specify --platform=gke to use:
|
||||
|
||||
Cluster resource - Kubernetes Engine cluster to connect to. 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 --cluster on the command line with a fully
|
||||
specified name;
|
||||
▫ set the property run/cluster with a fully specified name;
|
||||
▫ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
▫ provide the argument --project on the command line;
|
||||
▫ set the property core/project.
|
||||
|
||||
--cluster=CLUSTER
|
||||
ID of the cluster or fully qualified identifier for the cluster.
|
||||
To set the cluster attribute:
|
||||
◇ provide the argument --cluster on the command line;
|
||||
◇ set the property run/cluster;
|
||||
◇ specify the cluster from a list of available clusters.
|
||||
|
||||
--cluster-location=CLUSTER_LOCATION
|
||||
Zone in which the cluster is located. Alternatively, set the
|
||||
property [run/cluster_location]. To set the location attribute:
|
||||
◇ provide the argument --cluster on the command line with a
|
||||
fully specified name;
|
||||
◇ set the property run/cluster with a fully specified name;
|
||||
◇ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
◇ provide the argument --cluster-location on the command line;
|
||||
◇ set the property run/cluster_location;
|
||||
◇ specify the cluster location from a list of available zones.
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on
|
||||
VMware. Specify --platform=kubernetes to use:
|
||||
|
||||
--context=CONTEXT
|
||||
The name of the context in your kubectl config file to use for
|
||||
connecting.
|
||||
|
||||
--kubeconfig=KUBECONFIG
|
||||
The absolute path to your kubectl config file. If not specified,
|
||||
the colon- or semicolon-delimited list of paths specified by
|
||||
$KUBECONFIG will be used. If $KUBECONFIG is unset, this defaults to
|
||||
~/.kube/config.
|
||||
|
||||
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. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud run services describe
|
||||
|
||||
$ gcloud alpha run services describe
|
||||
|
||||
171
gcloud/beta/run/services/get-iam-policy
Normal file
171
gcloud/beta/run/services/get-iam-policy
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
NAME
|
||||
gcloud beta run services get-iam-policy - get the IAM policy for a Cloud
|
||||
Run service
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta run services get-iam-policy SERVICE
|
||||
[--platform=PLATFORM; default="managed"]
|
||||
[--region=REGION
|
||||
| --cluster=CLUSTER --cluster-location=CLUSTER_LOCATION
|
||||
| --context=CONTEXT --kubeconfig=KUBECONFIG] [--filter=EXPRESSION]
|
||||
[--limit=LIMIT] [--page-size=PAGE_SIZE] [--sort-by=[FIELD,...]]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) This command gets the IAM policy for a service. If formatted as
|
||||
JSON, the output can be edited and used as a policy file for
|
||||
set-iam-policy. The output includes an "etag" field identifying the version
|
||||
emitted and allowing detection of concurrent policy updates; see $ gcloud
|
||||
alpha run registries set-iam-policy for additional details.
|
||||
|
||||
EXAMPLES
|
||||
To print the IAM policy for a given service, run:
|
||||
|
||||
$ gcloud beta run services get-iam-policy --region=us-central1 \
|
||||
my-service
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Service resource - The service for which to display the IAM policy. This
|
||||
represents a Cloud 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 on the command line with a fully
|
||||
specified name;
|
||||
◆ set the property core/project;
|
||||
◆ provide the argument --project on the command line. To set the region
|
||||
attribute:
|
||||
◆ provide the argument service on the command line with a fully
|
||||
specified name;
|
||||
◆ provide the argument --region on the command line;
|
||||
◆ set the property run/region;
|
||||
◆ specify from a list of available regions in a prompt.
|
||||
|
||||
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.
|
||||
|
||||
FLAGS
|
||||
--platform=PLATFORM; default="managed"
|
||||
Target platform for running commands. Alternatively, set the property
|
||||
[run/platform]. PLATFORM must be one of:
|
||||
|
||||
managed
|
||||
Fully managed version of Cloud Run. Use with the --region flag or
|
||||
set the [run/region] property to specify a Cloud Run region.
|
||||
gke
|
||||
Cloud Run for Anthos on Google Cloud. Use with the --cluster and
|
||||
--cluster-location flags or set the [run/cluster] and
|
||||
[run/cluster_location] properties to specify a cluster in a given
|
||||
zone.
|
||||
kubernetes
|
||||
Use a Knative-compatible kubernetes cluster. Use with the
|
||||
--kubeconfig and --context flags to specify a kubeconfig file and
|
||||
the context for connecting.
|
||||
|
||||
Arguments to locate resources, depending on the platform used.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
Only applicable if connecting to Cloud Run (fully managed). Specify
|
||||
--platform=managed to use:
|
||||
|
||||
--region=REGION
|
||||
Region in which the resource can be found. Alternatively, set the
|
||||
property [run/region].
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on Google
|
||||
Cloud. Specify --platform=gke to use:
|
||||
|
||||
Cluster resource - Kubernetes Engine cluster to connect to. 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 --cluster on the command line with a fully
|
||||
specified name;
|
||||
▫ set the property run/cluster with a fully specified name;
|
||||
▫ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
▫ provide the argument --project on the command line;
|
||||
▫ set the property core/project.
|
||||
|
||||
--cluster=CLUSTER
|
||||
ID of the cluster or fully qualified identifier for the cluster.
|
||||
To set the cluster attribute:
|
||||
◇ provide the argument --cluster on the command line;
|
||||
◇ set the property run/cluster;
|
||||
◇ specify the cluster from a list of available clusters.
|
||||
|
||||
--cluster-location=CLUSTER_LOCATION
|
||||
Zone in which the cluster is located. Alternatively, set the
|
||||
property [run/cluster_location]. To set the location attribute:
|
||||
◇ provide the argument --cluster on the command line with a
|
||||
fully specified name;
|
||||
◇ set the property run/cluster with a fully specified name;
|
||||
◇ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
◇ provide the argument --cluster-location on the command line;
|
||||
◇ set the property run/cluster_location;
|
||||
◇ specify the cluster location from a list of available zones.
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on
|
||||
VMware. Specify --platform=kubernetes to use:
|
||||
|
||||
--context=CONTEXT
|
||||
The name of the context in your kubectl config file to use for
|
||||
connecting.
|
||||
|
||||
--kubeconfig=KUBECONFIG
|
||||
The absolute path to your kubectl config file. If not specified,
|
||||
the colon- or semicolon-delimited list of paths specified by
|
||||
$KUBECONFIG will be used. If $KUBECONFIG is unset, this defaults to
|
||||
~/.kube/config.
|
||||
|
||||
LIST COMMAND FLAGS
|
||||
--filter=EXPRESSION
|
||||
Apply a Boolean filter EXPRESSION to each resource item to be listed.
|
||||
If the expression evaluates True, then that item is listed. For more
|
||||
details and examples of filter expressions, run $ gcloud topic filters.
|
||||
This flag interacts with other flags that are applied in this order:
|
||||
--flatten, --sort-by, --filter, --limit.
|
||||
|
||||
--limit=LIMIT
|
||||
Maximum number of resources to list. The default is unlimited. This
|
||||
flag interacts with other flags that are applied in this order:
|
||||
--flatten, --sort-by, --filter, --limit.
|
||||
|
||||
--page-size=PAGE_SIZE
|
||||
Some services group resource list output into pages. This flag
|
||||
specifies the maximum number of resources per page. The default is
|
||||
determined by the service if it supports paging, otherwise it is
|
||||
unlimited (no paging). Paging may be applied before or after --filter
|
||||
and --limit depending on the service.
|
||||
|
||||
--sort-by=[FIELD,...]
|
||||
Comma-separated list of resource field key names to sort by. The
|
||||
default order is ascending. Prefix a field with ``~'' for descending
|
||||
order on that field. This flag interacts with other flags that are
|
||||
applied in this order: --flatten, --sort-by, --filter, --limit.
|
||||
|
||||
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 run/v1 API. The full documentation for this API can
|
||||
be found at: https://cloud.google.com/run/
|
||||
|
||||
NOTES
|
||||
This command is currently in beta and might change without notice. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud run services get-iam-policy
|
||||
|
||||
$ gcloud alpha run services get-iam-policy
|
||||
|
||||
143
gcloud/beta/run/services/help
Normal file
143
gcloud/beta/run/services/help
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
NAME
|
||||
gcloud beta run services - view and manage your Cloud Run services
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta run services COMMAND [--platform=PLATFORM; default="managed"]
|
||||
[--region=REGION
|
||||
| --cluster=CLUSTER --cluster-location=CLUSTER_LOCATION
|
||||
| --context=CONTEXT --kubeconfig=KUBECONFIG] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) This set of commands can be used to view and manage your existing
|
||||
Cloud Run services.
|
||||
|
||||
To create new deployments, use gcloud beta run deploy.
|
||||
|
||||
EXAMPLES
|
||||
To list your deployed services, run:
|
||||
|
||||
$ gcloud beta run services list
|
||||
|
||||
FLAGS
|
||||
--platform=PLATFORM; default="managed"
|
||||
Target platform for running commands. Alternatively, set the property
|
||||
[run/platform]. PLATFORM must be one of:
|
||||
|
||||
managed
|
||||
Fully managed version of Cloud Run. Use with the --region flag or
|
||||
set the [run/region] property to specify a Cloud Run region.
|
||||
gke
|
||||
Cloud Run for Anthos on Google Cloud. Use with the --cluster and
|
||||
--cluster-location flags or set the [run/cluster] and
|
||||
[run/cluster_location] properties to specify a cluster in a given
|
||||
zone.
|
||||
kubernetes
|
||||
Use a Knative-compatible kubernetes cluster. Use with the
|
||||
--kubeconfig and --context flags to specify a kubeconfig file and
|
||||
the context for connecting.
|
||||
|
||||
Arguments to locate resources, depending on the platform used.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
Only applicable if connecting to Cloud Run (fully managed). Specify
|
||||
--platform=managed to use:
|
||||
|
||||
--region=REGION
|
||||
Region in which the resource can be found. Alternatively, set the
|
||||
property [run/region].
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on Google
|
||||
Cloud. Specify --platform=gke to use:
|
||||
|
||||
Cluster resource - Kubernetes Engine cluster to connect to. 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 --cluster on the command line with a fully
|
||||
specified name;
|
||||
▫ set the property run/cluster with a fully specified name;
|
||||
▫ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
▫ provide the argument --project on the command line;
|
||||
▫ set the property core/project.
|
||||
|
||||
--cluster=CLUSTER
|
||||
ID of the cluster or fully qualified identifier for the cluster.
|
||||
To set the cluster attribute:
|
||||
◇ provide the argument --cluster on the command line;
|
||||
◇ set the property run/cluster;
|
||||
◇ specify the cluster from a list of available clusters.
|
||||
|
||||
--cluster-location=CLUSTER_LOCATION
|
||||
Zone in which the cluster is located. Alternatively, set the
|
||||
property [run/cluster_location]. To set the location attribute:
|
||||
◇ provide the argument --cluster on the command line with a
|
||||
fully specified name;
|
||||
◇ set the property run/cluster with a fully specified name;
|
||||
◇ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
◇ provide the argument --cluster-location on the command line;
|
||||
◇ set the property run/cluster_location;
|
||||
◇ specify the cluster location from a list of available zones.
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on
|
||||
VMware. Specify --platform=kubernetes to use:
|
||||
|
||||
--context=CONTEXT
|
||||
The name of the context in your kubectl config file to use for
|
||||
connecting.
|
||||
|
||||
--kubeconfig=KUBECONFIG
|
||||
The absolute path to your kubectl config file. If not specified,
|
||||
the colon- or semicolon-delimited list of paths specified by
|
||||
$KUBECONFIG will be used. If $KUBECONFIG is unset, this defaults to
|
||||
~/.kube/config.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --help.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
COMMANDS
|
||||
COMMAND is one of the following:
|
||||
|
||||
add-iam-policy-binding
|
||||
(BETA) Add IAM policy binding to a Cloud Run service.
|
||||
|
||||
delete
|
||||
(BETA) Delete a service.
|
||||
|
||||
describe
|
||||
(BETA) Obtain details about a given service.
|
||||
|
||||
get-iam-policy
|
||||
(BETA) Get the IAM policy for a Cloud Run service.
|
||||
|
||||
list
|
||||
(BETA) List available services.
|
||||
|
||||
remove-iam-policy-binding
|
||||
(BETA) Remove IAM policy binding of a Cloud Run service.
|
||||
|
||||
replace
|
||||
(BETA) Creates or replaces a service from a YAML Service specification.
|
||||
|
||||
set-iam-policy
|
||||
(BETA) Set the IAM policy for a service.
|
||||
|
||||
update
|
||||
(BETA) Update Cloud Run environment variables and other configuration
|
||||
settings.
|
||||
|
||||
update-traffic
|
||||
(BETA) Adjust the traffic assignments for a Cloud Run service.
|
||||
|
||||
NOTES
|
||||
This command is currently in beta and might change without notice. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud run services
|
||||
|
||||
$ gcloud alpha run services
|
||||
|
||||
161
gcloud/beta/run/services/list
Normal file
161
gcloud/beta/run/services/list
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
NAME
|
||||
gcloud beta run services list - list available services
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta run services list [--namespace=NAMESPACE]
|
||||
[--platform=PLATFORM; default="managed"]
|
||||
[--region=REGION
|
||||
| --cluster=CLUSTER --cluster-location=CLUSTER_LOCATION
|
||||
| --context=CONTEXT --kubeconfig=KUBECONFIG] [--filter=EXPRESSION]
|
||||
[--limit=LIMIT] [--page-size=PAGE_SIZE] [--sort-by=[FIELD,...]] [--uri]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) List available services.
|
||||
|
||||
EXAMPLES
|
||||
To list available services:
|
||||
|
||||
$ gcloud beta run services list
|
||||
|
||||
FLAGS
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on Google
|
||||
Cloud or Cloud Run for Anthos deployed on VMware. Specify --platform=gke
|
||||
or --platform=kubernetes to use:
|
||||
|
||||
Namespace resource - Namespace to list services in. This represents a
|
||||
Cloud resource.
|
||||
|
||||
--namespace=NAMESPACE
|
||||
ID of the namespace or fully qualified identifier for the
|
||||
namespace. To set the namespace attribute:
|
||||
▫ 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.
|
||||
|
||||
--platform=PLATFORM; default="managed"
|
||||
Target platform for running commands. Alternatively, set the property
|
||||
[run/platform]. PLATFORM must be one of:
|
||||
|
||||
managed
|
||||
Fully managed version of Cloud Run. Use with the --region flag or
|
||||
set the [run/region] property to specify a Cloud Run region.
|
||||
gke
|
||||
Cloud Run for Anthos on Google Cloud. Use with the --cluster and
|
||||
--cluster-location flags or set the [run/cluster] and
|
||||
[run/cluster_location] properties to specify a cluster in a given
|
||||
zone.
|
||||
kubernetes
|
||||
Use a Knative-compatible kubernetes cluster. Use with the
|
||||
--kubeconfig and --context flags to specify a kubeconfig file and
|
||||
the context for connecting.
|
||||
|
||||
Arguments to locate resources, depending on the platform used.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
Only applicable if connecting to Cloud Run (fully managed). Specify
|
||||
--platform=managed to use:
|
||||
|
||||
--region=REGION
|
||||
Region in which the resource can be found. Alternatively, set the
|
||||
property [run/region].
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on Google
|
||||
Cloud. Specify --platform=gke to use:
|
||||
|
||||
Cluster resource - Kubernetes Engine cluster to connect to. 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 --cluster on the command line with a fully
|
||||
specified name;
|
||||
▫ set the property run/cluster with a fully specified name;
|
||||
▫ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
▫ provide the argument --project on the command line;
|
||||
▫ set the property core/project.
|
||||
|
||||
--cluster=CLUSTER
|
||||
ID of the cluster or fully qualified identifier for the cluster.
|
||||
To set the cluster attribute:
|
||||
◇ provide the argument --cluster on the command line;
|
||||
◇ set the property run/cluster;
|
||||
◇ specify the cluster from a list of available clusters.
|
||||
|
||||
--cluster-location=CLUSTER_LOCATION
|
||||
Zone in which the cluster is located. Alternatively, set the
|
||||
property [run/cluster_location]. To set the location attribute:
|
||||
◇ provide the argument --cluster on the command line with a
|
||||
fully specified name;
|
||||
◇ set the property run/cluster with a fully specified name;
|
||||
◇ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
◇ provide the argument --cluster-location on the command line;
|
||||
◇ set the property run/cluster_location;
|
||||
◇ specify the cluster location from a list of available zones.
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on
|
||||
VMware. Specify --platform=kubernetes to use:
|
||||
|
||||
--context=CONTEXT
|
||||
The name of the context in your kubectl config file to use for
|
||||
connecting.
|
||||
|
||||
--kubeconfig=KUBECONFIG
|
||||
The absolute path to your kubectl config file. If not specified,
|
||||
the colon- or semicolon-delimited list of paths specified by
|
||||
$KUBECONFIG will be used. If $KUBECONFIG is unset, this defaults to
|
||||
~/.kube/config.
|
||||
|
||||
LIST COMMAND FLAGS
|
||||
--filter=EXPRESSION
|
||||
Apply a Boolean filter EXPRESSION to each resource item to be listed.
|
||||
If the expression evaluates True, then that item is listed. For more
|
||||
details and examples of filter expressions, run $ gcloud topic filters.
|
||||
This flag interacts with other flags that are applied in this order:
|
||||
--flatten, --sort-by, --filter, --limit.
|
||||
|
||||
--limit=LIMIT
|
||||
Maximum number of resources to list. The default is unlimited. This
|
||||
flag interacts with other flags that are applied in this order:
|
||||
--flatten, --sort-by, --filter, --limit.
|
||||
|
||||
--page-size=PAGE_SIZE
|
||||
Some services group resource list output into pages. This flag
|
||||
specifies the maximum number of resources per page. The default is
|
||||
determined by the service if it supports paging, otherwise it is
|
||||
unlimited (no paging). Paging may be applied before or after --filter
|
||||
and --limit depending on the service.
|
||||
|
||||
--sort-by=[FIELD,...]
|
||||
Comma-separated list of resource field key names to sort by. The
|
||||
default order is ascending. Prefix a field with ``~'' for descending
|
||||
order on that field. This flag interacts with other flags that are
|
||||
applied in this order: --flatten, --sort-by, --filter, --limit.
|
||||
|
||||
--uri
|
||||
Print a list of resource URIs instead of the default output, and change
|
||||
the command output to a list of URIs. If this flag is used with
|
||||
--format, the formatting is applied on this URI list. To display URIs
|
||||
alongside other keys instead, use the uri() transform.
|
||||
|
||||
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. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud run services list
|
||||
|
||||
$ gcloud alpha run services list
|
||||
|
||||
222
gcloud/beta/run/services/remove-iam-policy-binding
Normal file
222
gcloud/beta/run/services/remove-iam-policy-binding
Normal file
|
|
@ -0,0 +1,222 @@
|
|||
NAME
|
||||
gcloud beta run services remove-iam-policy-binding - remove IAM policy
|
||||
binding of a Cloud Run service
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta run services remove-iam-policy-binding SERVICE
|
||||
--member=PRINCIPAL --role=ROLE [--platform=PLATFORM; default="managed"]
|
||||
[--all | --condition=[KEY=VALUE,...]
|
||||
| --condition-from-file=CONDITION_FROM_FILE]
|
||||
[--region=REGION
|
||||
| --cluster=CLUSTER --cluster-location=CLUSTER_LOCATION
|
||||
| --context=CONTEXT --kubeconfig=KUBECONFIG] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) Remove an IAM policy binding from the IAM policy of a service. One
|
||||
binding consists of a member, a role, and an optional condition.
|
||||
|
||||
EXAMPLES
|
||||
To remove an IAM policy binding for the role of 'roles/run.invoker' for the
|
||||
user 'test-user@gmail.com' with servcie 'my-service' and region
|
||||
'us-central1', run:
|
||||
|
||||
$ gcloud beta run services remove-iam-policy-binding my-service \
|
||||
--region='us-central1' --member='user:test-user@gmail.com' \
|
||||
--role='roles/run.invoker'
|
||||
|
||||
To remove an IAM policy binding which expires at the end of the year 2019
|
||||
for the role of 'roles/run.invoker' and the user 'test-user@gmail.com' with
|
||||
service 'my-service' and region 'us-central1', run:
|
||||
|
||||
$ gcloud beta run services remove-iam-policy-binding my-service \
|
||||
--region='us-central1' --member='user:test-user@gmail.com' \
|
||||
--role='roles/run.invoker' \
|
||||
--condition='expression=request.time <
|
||||
timestamp("2020-01-01T00:00:00Z"),title=expires_end_of_2019,descrip\
|
||||
tion=Expires at midnight on 2019-12-31'
|
||||
|
||||
See https://cloud.google.com/iam/docs/managing-policies for details of
|
||||
policy role and member types.
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Service resource - The service for which to remove the IAM policy binding.
|
||||
This represents a Cloud 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 on the command line with a fully
|
||||
specified name;
|
||||
◆ set the property core/project;
|
||||
◆ provide the argument --project on the command line. To set the region
|
||||
attribute:
|
||||
◆ provide the argument service on the command line with a fully
|
||||
specified name;
|
||||
◆ provide the argument --region on the command line;
|
||||
◆ set the property run/region;
|
||||
◆ specify from a list of available regions in a prompt.
|
||||
|
||||
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.
|
||||
|
||||
REQUIRED FLAGS
|
||||
--member=PRINCIPAL
|
||||
The principal to remove the binding for. Should be of the form
|
||||
user|group|serviceAccount:email or domain:domain.
|
||||
|
||||
Examples: user:test-user@gmail.com, group:admins@example.com,
|
||||
serviceAccount:test123@example.domain.com, or
|
||||
domain:example.domain.com.
|
||||
|
||||
Deleted principals have an additional deleted: prefix and a ?uid=UID
|
||||
suffix, where UID is a unique identifier for the principal. Example:
|
||||
deleted:user:test-user@gmail.com?uid=123456789012345678901.
|
||||
|
||||
Some resources also accept the following special values:
|
||||
◆ allUsers - Special identifier that represents anyone who is on the
|
||||
internet, with or without a Google account.
|
||||
◆ allAuthenticatedUsers - Special identifier that represents anyone
|
||||
who is authenticated with a Google account or a service account.
|
||||
|
||||
--role=ROLE
|
||||
The role to remove the principal from.
|
||||
|
||||
OPTIONAL FLAGS
|
||||
--platform=PLATFORM; default="managed"
|
||||
Target platform for running commands. Alternatively, set the property
|
||||
[run/platform]. PLATFORM must be one of:
|
||||
|
||||
managed
|
||||
Fully managed version of Cloud Run. Use with the --region flag or
|
||||
set the [run/region] property to specify a Cloud Run region.
|
||||
gke
|
||||
Cloud Run for Anthos on Google Cloud. Use with the --cluster and
|
||||
--cluster-location flags or set the [run/cluster] and
|
||||
[run/cluster_location] properties to specify a cluster in a given
|
||||
zone.
|
||||
kubernetes
|
||||
Use a Knative-compatible kubernetes cluster. Use with the
|
||||
--kubeconfig and --context flags to specify a kubeconfig file and
|
||||
the context for connecting.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--all
|
||||
Remove all bindings with this role and principal, irrespective of any
|
||||
conditions.
|
||||
|
||||
--condition=[KEY=VALUE,...]
|
||||
The condition of the binding that you want to remove. When the
|
||||
condition is explicitly specified as None (--condition=None), a
|
||||
binding without a condition is removed. Otherwise, only a binding
|
||||
with a condition that exactly matches the specified condition
|
||||
(including the optional description) is removed. For more on
|
||||
conditions, refer to the conditions overview guide:
|
||||
https://cloud.google.com/iam/docs/conditions-overview
|
||||
|
||||
When using the --condition flag, include the following key-value
|
||||
pairs:
|
||||
|
||||
expression
|
||||
(Required) Condition expression that evaluates to True or False.
|
||||
This uses a subset of Common Expression Language syntax.
|
||||
|
||||
If the condition expression includes a comma, use a different
|
||||
delimiter to separate the key-value pairs. Specify the delimiter
|
||||
before listing the key-value pairs. For example, to specify a
|
||||
colon (:) as the delimiter, do the following:
|
||||
--condition=^:^title=TITLE:expression=EXPRESSION. For more
|
||||
information, see
|
||||
https://cloud.google.com/sdk/gcloud/reference/topic/escaping.
|
||||
|
||||
title
|
||||
(Required) A short string describing the purpose of the
|
||||
expression.
|
||||
|
||||
description
|
||||
(Optional) Additional description for the expression.
|
||||
|
||||
--condition-from-file=CONDITION_FROM_FILE
|
||||
Path to a local JSON or YAML file that defines the condition. To see
|
||||
available fields, see the help for --condition.
|
||||
|
||||
Arguments to locate resources, depending on the platform used.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
Only applicable if connecting to Cloud Run (fully managed). Specify
|
||||
--platform=managed to use:
|
||||
|
||||
--region=REGION
|
||||
Region in which the resource can be found. Alternatively, set the
|
||||
property [run/region].
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on Google
|
||||
Cloud. Specify --platform=gke to use:
|
||||
|
||||
Cluster resource - Kubernetes Engine cluster to connect to. 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 --cluster on the command line with a fully
|
||||
specified name;
|
||||
▫ set the property run/cluster with a fully specified name;
|
||||
▫ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
▫ provide the argument --project on the command line;
|
||||
▫ set the property core/project.
|
||||
|
||||
--cluster=CLUSTER
|
||||
ID of the cluster or fully qualified identifier for the cluster.
|
||||
To set the cluster attribute:
|
||||
◇ provide the argument --cluster on the command line;
|
||||
◇ set the property run/cluster;
|
||||
◇ specify the cluster from a list of available clusters.
|
||||
|
||||
--cluster-location=CLUSTER_LOCATION
|
||||
Zone in which the cluster is located. Alternatively, set the
|
||||
property [run/cluster_location]. To set the location attribute:
|
||||
◇ provide the argument --cluster on the command line with a
|
||||
fully specified name;
|
||||
◇ set the property run/cluster with a fully specified name;
|
||||
◇ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
◇ provide the argument --cluster-location on the command line;
|
||||
◇ set the property run/cluster_location;
|
||||
◇ specify the cluster location from a list of available zones.
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on
|
||||
VMware. Specify --platform=kubernetes to use:
|
||||
|
||||
--context=CONTEXT
|
||||
The name of the context in your kubectl config file to use for
|
||||
connecting.
|
||||
|
||||
--kubeconfig=KUBECONFIG
|
||||
The absolute path to your kubectl config file. If not specified,
|
||||
the colon- or semicolon-delimited list of paths specified by
|
||||
$KUBECONFIG will be used. If $KUBECONFIG is unset, this defaults to
|
||||
~/.kube/config.
|
||||
|
||||
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 run/v1 API. The full documentation for this API can
|
||||
be found at: https://cloud.google.com/run/
|
||||
|
||||
NOTES
|
||||
This command is currently in beta and might change without notice. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud run services remove-iam-policy-binding
|
||||
|
||||
$ gcloud alpha run services remove-iam-policy-binding
|
||||
|
||||
137
gcloud/beta/run/services/replace
Normal file
137
gcloud/beta/run/services/replace
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
NAME
|
||||
gcloud beta run services replace - creates or replaces a service from a
|
||||
YAML Service specification
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta run services replace FILE [--async] [--namespace=NAMESPACE]
|
||||
[--platform=PLATFORM; default="managed"]
|
||||
[--region=REGION
|
||||
| --cluster=CLUSTER --cluster-location=CLUSTER_LOCATION
|
||||
| --context=CONTEXT --kubeconfig=KUBECONFIG] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) Creates or replaces a service from a YAML Service specification.
|
||||
|
||||
EXAMPLES
|
||||
To replace the specification for myservice
|
||||
|
||||
$ gcloud beta run services replace myservice.yaml
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
FILE
|
||||
The absolute path to the YAML file with a Knative service definition
|
||||
for the service to update or deploy.
|
||||
|
||||
FLAGS
|
||||
--async
|
||||
Return immediately, without waiting for the operation in progress to
|
||||
complete.
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on Google
|
||||
Cloud or Cloud Run for Anthos deployed on VMware. Specify --platform=gke
|
||||
or --platform=kubernetes to use:
|
||||
|
||||
Namespace resource - Namespace to replace service. This represents a
|
||||
Cloud resource.
|
||||
|
||||
--namespace=NAMESPACE
|
||||
ID of the namespace or fully qualified identifier for the
|
||||
namespace. To set the namespace attribute:
|
||||
▫ 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.
|
||||
|
||||
--platform=PLATFORM; default="managed"
|
||||
Target platform for running commands. Alternatively, set the property
|
||||
[run/platform]. PLATFORM must be one of:
|
||||
|
||||
managed
|
||||
Fully managed version of Cloud Run. Use with the --region flag or
|
||||
set the [run/region] property to specify a Cloud Run region.
|
||||
gke
|
||||
Cloud Run for Anthos on Google Cloud. Use with the --cluster and
|
||||
--cluster-location flags or set the [run/cluster] and
|
||||
[run/cluster_location] properties to specify a cluster in a given
|
||||
zone.
|
||||
kubernetes
|
||||
Use a Knative-compatible kubernetes cluster. Use with the
|
||||
--kubeconfig and --context flags to specify a kubeconfig file and
|
||||
the context for connecting.
|
||||
|
||||
Arguments to locate resources, depending on the platform used.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
Only applicable if connecting to Cloud Run (fully managed). Specify
|
||||
--platform=managed to use:
|
||||
|
||||
--region=REGION
|
||||
Region in which the resource can be found. Alternatively, set the
|
||||
property [run/region].
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on Google
|
||||
Cloud. Specify --platform=gke to use:
|
||||
|
||||
Cluster resource - Kubernetes Engine cluster to connect to. 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 --cluster on the command line with a fully
|
||||
specified name;
|
||||
▫ set the property run/cluster with a fully specified name;
|
||||
▫ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
▫ provide the argument --project on the command line;
|
||||
▫ set the property core/project.
|
||||
|
||||
--cluster=CLUSTER
|
||||
ID of the cluster or fully qualified identifier for the cluster.
|
||||
To set the cluster attribute:
|
||||
◇ provide the argument --cluster on the command line;
|
||||
◇ set the property run/cluster;
|
||||
◇ specify the cluster from a list of available clusters.
|
||||
|
||||
--cluster-location=CLUSTER_LOCATION
|
||||
Zone in which the cluster is located. Alternatively, set the
|
||||
property [run/cluster_location]. To set the location attribute:
|
||||
◇ provide the argument --cluster on the command line with a
|
||||
fully specified name;
|
||||
◇ set the property run/cluster with a fully specified name;
|
||||
◇ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
◇ provide the argument --cluster-location on the command line;
|
||||
◇ set the property run/cluster_location;
|
||||
◇ specify the cluster location from a list of available zones.
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on
|
||||
VMware. Specify --platform=kubernetes to use:
|
||||
|
||||
--context=CONTEXT
|
||||
The name of the context in your kubectl config file to use for
|
||||
connecting.
|
||||
|
||||
--kubeconfig=KUBECONFIG
|
||||
The absolute path to your kubectl config file. If not specified,
|
||||
the colon- or semicolon-delimited list of paths specified by
|
||||
$KUBECONFIG will be used. If $KUBECONFIG is unset, this defaults to
|
||||
~/.kube/config.
|
||||
|
||||
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. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud run services replace
|
||||
|
||||
$ gcloud alpha run services replace
|
||||
|
||||
155
gcloud/beta/run/services/set-iam-policy
Normal file
155
gcloud/beta/run/services/set-iam-policy
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
NAME
|
||||
gcloud beta run services set-iam-policy - set the IAM policy for a service
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta run services set-iam-policy SERVICE POLICY_FILE
|
||||
[--platform=PLATFORM; default="managed"]
|
||||
[--region=REGION
|
||||
| --cluster=CLUSTER --cluster-location=CLUSTER_LOCATION
|
||||
| --context=CONTEXT --kubeconfig=KUBECONFIG] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) This command replaces the existing IAM policy for a service, given a
|
||||
service and a file encoded in JSON or YAML that contains the IAM policy. If
|
||||
the given policy file specifies an "etag" value, then the replacement will
|
||||
succeed only if the policy already in place matches that etag. (An etag
|
||||
obtain via get-iam-policy will prevent the replacement if the policy for
|
||||
the service has been subsequently updated.) A policy file that does not
|
||||
contain an etag value will replace any existing policy for the service.
|
||||
|
||||
EXAMPLES
|
||||
The following command will read an IAM policy defined in a JSON file
|
||||
'policy.json' and set it for a service with identifier 'my-service'
|
||||
|
||||
$ gcloud beta run services set-iam-policy --region=us-central1 \
|
||||
my-service policy.json
|
||||
|
||||
See https://cloud.google.com/iam/docs/managing-policies for details of the
|
||||
policy file format and contents.
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Service resource - The service for which to set the IAM policy. This
|
||||
represents a Cloud 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 on the command line with a fully
|
||||
specified name;
|
||||
◆ set the property core/project;
|
||||
◆ provide the argument --project on the command line. To set the region
|
||||
attribute:
|
||||
◆ provide the argument service on the command line with a fully
|
||||
specified name;
|
||||
◆ provide the argument --region on the command line;
|
||||
◆ set the property run/region;
|
||||
◆ specify from a list of available regions in a prompt.
|
||||
|
||||
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.
|
||||
|
||||
POLICY_FILE
|
||||
Path to a local JSON or YAML formatted file containing a valid policy.
|
||||
|
||||
The output of the get-iam-policy command is a valid file, as is any
|
||||
JSON or YAML file conforming to the structure of a Policy
|
||||
(https://cloud.google.com/iam/reference/rest/v1/Policy).
|
||||
|
||||
FLAGS
|
||||
--platform=PLATFORM; default="managed"
|
||||
Target platform for running commands. Alternatively, set the property
|
||||
[run/platform]. PLATFORM must be one of:
|
||||
|
||||
managed
|
||||
Fully managed version of Cloud Run. Use with the --region flag or
|
||||
set the [run/region] property to specify a Cloud Run region.
|
||||
gke
|
||||
Cloud Run for Anthos on Google Cloud. Use with the --cluster and
|
||||
--cluster-location flags or set the [run/cluster] and
|
||||
[run/cluster_location] properties to specify a cluster in a given
|
||||
zone.
|
||||
kubernetes
|
||||
Use a Knative-compatible kubernetes cluster. Use with the
|
||||
--kubeconfig and --context flags to specify a kubeconfig file and
|
||||
the context for connecting.
|
||||
|
||||
Arguments to locate resources, depending on the platform used.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
Only applicable if connecting to Cloud Run (fully managed). Specify
|
||||
--platform=managed to use:
|
||||
|
||||
--region=REGION
|
||||
Region in which the resource can be found. Alternatively, set the
|
||||
property [run/region].
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on Google
|
||||
Cloud. Specify --platform=gke to use:
|
||||
|
||||
Cluster resource - Kubernetes Engine cluster to connect to. 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 --cluster on the command line with a fully
|
||||
specified name;
|
||||
▫ set the property run/cluster with a fully specified name;
|
||||
▫ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
▫ provide the argument --project on the command line;
|
||||
▫ set the property core/project.
|
||||
|
||||
--cluster=CLUSTER
|
||||
ID of the cluster or fully qualified identifier for the cluster.
|
||||
To set the cluster attribute:
|
||||
◇ provide the argument --cluster on the command line;
|
||||
◇ set the property run/cluster;
|
||||
◇ specify the cluster from a list of available clusters.
|
||||
|
||||
--cluster-location=CLUSTER_LOCATION
|
||||
Zone in which the cluster is located. Alternatively, set the
|
||||
property [run/cluster_location]. To set the location attribute:
|
||||
◇ provide the argument --cluster on the command line with a
|
||||
fully specified name;
|
||||
◇ set the property run/cluster with a fully specified name;
|
||||
◇ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
◇ provide the argument --cluster-location on the command line;
|
||||
◇ set the property run/cluster_location;
|
||||
◇ specify the cluster location from a list of available zones.
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on
|
||||
VMware. Specify --platform=kubernetes to use:
|
||||
|
||||
--context=CONTEXT
|
||||
The name of the context in your kubectl config file to use for
|
||||
connecting.
|
||||
|
||||
--kubeconfig=KUBECONFIG
|
||||
The absolute path to your kubectl config file. If not specified,
|
||||
the colon- or semicolon-delimited list of paths specified by
|
||||
$KUBECONFIG will be used. If $KUBECONFIG is unset, this defaults to
|
||||
~/.kube/config.
|
||||
|
||||
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 run/v1 API. The full documentation for this API can
|
||||
be found at: https://cloud.google.com/run/
|
||||
|
||||
NOTES
|
||||
This command is currently in beta and might change without notice. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud run services set-iam-policy
|
||||
|
||||
$ gcloud alpha run services set-iam-policy
|
||||
|
||||
500
gcloud/beta/run/services/update
Normal file
500
gcloud/beta/run/services/update
Normal file
|
|
@ -0,0 +1,500 @@
|
|||
NAME
|
||||
gcloud beta run services update - update Cloud Run environment variables
|
||||
and other configuration settings
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta run services update [[SERVICE] --namespace=NAMESPACE]
|
||||
[--args=[ARG,...]] [--async] [--command=[COMMAND,...]]
|
||||
[--concurrency=CONCURRENCY] [--cpu=CPU] [--image=IMAGE]
|
||||
[--ingress=INGRESS; default="all"] [--max-instances=MAX_INSTANCES]
|
||||
[--memory=MEMORY] [--min-instances=MIN_INSTANCES]
|
||||
[--platform=PLATFORM; default="managed"] [--port=PORT]
|
||||
[--service-account=SERVICE_ACCOUNT] [--tag=TAG] [--timeout=TIMEOUT]
|
||||
[--no-traffic] [--[no-]use-http2]
|
||||
[--breakglass=JUSTIFICATION --clear-vpc-connector --[no-]cpu-throttling
|
||||
--execution-environment=EXECUTION_ENVIRONMENT
|
||||
--revision-suffix=REVISION_SUFFIX --vpc-connector=VPC_CONNECTOR
|
||||
--vpc-egress=VPC_EGRESS
|
||||
--add-cloudsql-instances=[CLOUDSQL-INSTANCES,...]
|
||||
| --clear-cloudsql-instances
|
||||
| --remove-cloudsql-instances=[CLOUDSQL-INSTANCES,...]
|
||||
| --set-cloudsql-instances=[CLOUDSQL-INSTANCES,...]
|
||||
--binary-authorization=POLICY
|
||||
| --clear-binary-authorization --clear-key
|
||||
| --key=KEY --clear-post-key-revocation-action-type
|
||||
| --post-key-revocation-action-type=POST_KEY_REVOCATION_ACTION_TYPE]
|
||||
[--clear-env-vars | --set-env-vars=[KEY=VALUE,...]
|
||||
| --remove-env-vars=[KEY,...] --update-env-vars=[KEY=VALUE,...]]
|
||||
[--clear-labels | --remove-labels=[KEY,...] --labels=[KEY=VALUE,...]
|
||||
| --update-labels=[KEY=VALUE,...]]
|
||||
[--clear-secrets | --set-secrets=[KEY=VALUE,...]
|
||||
| --remove-secrets=[KEY,...] --update-secrets=[KEY=VALUE,...]]
|
||||
[--connectivity=CONNECTIVITY --clear-config-maps
|
||||
| --set-config-maps=[KEY=VALUE,...] | --remove-config-maps=[KEY,...]
|
||||
--update-config-maps=[KEY=VALUE,...]]
|
||||
[--region=REGION
|
||||
| --cluster=CLUSTER --cluster-location=CLUSTER_LOCATION
|
||||
| --context=CONTEXT --kubeconfig=KUBECONFIG] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) Update Cloud Run environment variables and other configuration
|
||||
settings.
|
||||
|
||||
EXAMPLES
|
||||
To update one or more env vars:
|
||||
|
||||
$ gcloud beta run services update myservice \
|
||||
--update-env-vars=KEY1=VALUE1,KEY2=VALUE2
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Service resource - Service to update the configuration of. The arguments
|
||||
in this group can be used to specify the attributes of this resource.
|
||||
|
||||
[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;
|
||||
▸ specify the service name from an interactive prompt.
|
||||
|
||||
--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;
|
||||
▸ specify the service name from an interactive prompt 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
|
||||
--args=[ARG,...]
|
||||
Comma-separated arguments passed to the command run by the container
|
||||
image. If not specified and no '--command' is provided, the container
|
||||
image's default Cmd is used. Otherwise, if not specified, no arguments
|
||||
are passed. To reset this field to its default, pass an empty string.
|
||||
|
||||
--async
|
||||
Return immediately, without waiting for the operation in progress to
|
||||
complete.
|
||||
|
||||
--command=[COMMAND,...]
|
||||
Entrypoint for the container image. If not specified, the container
|
||||
image's default Entrypoint is run. To reset this field to its default,
|
||||
pass an empty string.
|
||||
|
||||
--concurrency=CONCURRENCY
|
||||
Set the maximum number of concurrent requests allowed per container
|
||||
instance. Leave concurrency unspecified or provide the special value
|
||||
'default' to receive the server default value.
|
||||
|
||||
--cpu=CPU
|
||||
Set a CPU limit in Kubernetes cpu units.
|
||||
|
||||
Cloud Run (fully managed) supports values 1, 2 and 4. For Cloud Run
|
||||
(fully managed), 4 cpus also requires a minimum 2Gi --memory value.
|
||||
Examples 2, 2.0, 2000m
|
||||
|
||||
Cloud Run for Anthos and Knative-compatible Kubernetes clusters support
|
||||
fractional values. Examples .5, 500m, 2
|
||||
|
||||
--image=IMAGE
|
||||
Name of the container image to deploy (e.g.
|
||||
gcr.io/cloudrun/hello:latest).
|
||||
|
||||
--ingress=INGRESS; default="all"
|
||||
Set the ingress traffic sources allowed to call the service. For Cloud
|
||||
Run (fully managed) the --[no-]allow-unauthenticated flag separately
|
||||
controls the identities allowed to call the service. INGRESS must be
|
||||
one of:
|
||||
|
||||
all
|
||||
Inbound requests from all sources are allowed.
|
||||
internal
|
||||
For Cloud Run (fully managed), only inbound requests from VPC
|
||||
networks in the same project or VPC Service Controls perimeter, as
|
||||
well as Pub/Sub subscriptions and Eventarc events in the same
|
||||
project or VPC Service Controls perimeter are allowed. All other
|
||||
requests are rejected. See
|
||||
https://cloud.google.com/run/docs/securing/ingress for full details
|
||||
on the definition of internal traffic for Cloud Run (fully
|
||||
managed). For Cloud Run for Anthos, only inbound requests from the
|
||||
same cluster are allowed.
|
||||
|
||||
internal-and-cloud-load-balancing
|
||||
Only supported for Cloud Run (fully managed). Only inbound requests
|
||||
from Google Cloud Load Balancing or a traffic source allowed by the
|
||||
internal option are allowed.
|
||||
|
||||
--max-instances=MAX_INSTANCES
|
||||
The maximum number of container instances of the Service to run. Use
|
||||
'default' to unset the limit and use the platform default.
|
||||
|
||||
--memory=MEMORY
|
||||
Set a memory limit. Ex: 1024Mi, 4Gi.
|
||||
|
||||
--min-instances=MIN_INSTANCES
|
||||
The minimum number of container instances of the Service to run or
|
||||
'default' to remove any minimum.
|
||||
|
||||
--platform=PLATFORM; default="managed"
|
||||
Target platform for running commands. Alternatively, set the property
|
||||
[run/platform]. PLATFORM must be one of:
|
||||
|
||||
managed
|
||||
Fully managed version of Cloud Run. Use with the --region flag or
|
||||
set the [run/region] property to specify a Cloud Run region.
|
||||
gke
|
||||
Cloud Run for Anthos on Google Cloud. Use with the --cluster and
|
||||
--cluster-location flags or set the [run/cluster] and
|
||||
[run/cluster_location] properties to specify a cluster in a given
|
||||
zone.
|
||||
kubernetes
|
||||
Use a Knative-compatible kubernetes cluster. Use with the
|
||||
--kubeconfig and --context flags to specify a kubeconfig file and
|
||||
the context for connecting.
|
||||
|
||||
--port=PORT
|
||||
Container port to receive requests at. Also sets the $PORT environment
|
||||
variable. Must be a number between 1 and 65535, inclusive. To unset
|
||||
this field, pass the special value "default".
|
||||
|
||||
--service-account=SERVICE_ACCOUNT
|
||||
Service account associated with the revision of the service. The
|
||||
service account represents the identity of the running revision, and
|
||||
determines what permissions the revision has. For the managed platform,
|
||||
this is the email address of an IAM service account. For the
|
||||
Kubernetes-based platforms (gke, kubernetes), this is the name of a
|
||||
Kubernetes service account in the same namespace as the service. If not
|
||||
provided, the revision will use the default service account of the
|
||||
project, or default Kubernetes namespace service account respectively.
|
||||
|
||||
--tag=TAG
|
||||
Traffic tag to assign to the newly created revision.
|
||||
|
||||
--timeout=TIMEOUT
|
||||
Set the maximum request execution time (timeout). It is specified as a
|
||||
duration; for example, "10m5s" is ten minutes, and five seconds. If you
|
||||
don't specify a unit, seconds is assumed. For example, "10" is 10
|
||||
seconds.
|
||||
|
||||
--no-traffic
|
||||
True to avoid sending traffic to the revision being deployed. Setting
|
||||
this flag assigns any traffic assigned to the LATEST revision to the
|
||||
specific revision bound to LATEST before the deployment. The effect is
|
||||
that the revision being deployed will not receive traffic.
|
||||
|
||||
After a deployment with this flag the LATEST revision will not receive
|
||||
traffic on future deployments. To restore sending traffic to the LATEST
|
||||
revision by default, run the gcloud run services update-traffic command
|
||||
with --to-latest.
|
||||
|
||||
--[no-]use-http2
|
||||
Whether to use HTTP/2 for connections to the service. Use --use-http2
|
||||
to enable and --no-use-http2 to disable.
|
||||
|
||||
Only applicable if connecting to Cloud Run (fully managed). Specify
|
||||
--platform=managed to use:
|
||||
|
||||
--breakglass=JUSTIFICATION
|
||||
Justification to bypass Binary Authorization policy constraints and
|
||||
allow the operation. See
|
||||
https://cloud.google.com/binary-authorization/docs/using-breakglass
|
||||
for more information.
|
||||
|
||||
--clear-vpc-connector
|
||||
Remove the VPC connector for this resource.
|
||||
|
||||
--[no-]cpu-throttling
|
||||
Whether to throttle the CPU when the container is not actively
|
||||
serving requests. Use --cpu-throttling to enable and
|
||||
--no-cpu-throttling to disable.
|
||||
|
||||
--execution-environment=EXECUTION_ENVIRONMENT
|
||||
Selects the execution environment where the application will run.
|
||||
EXECUTION_ENVIRONMENT must be one of:
|
||||
|
||||
gen1
|
||||
Run the application in a first generation execution environment.
|
||||
gen2
|
||||
Run the application in a second generation execution environment.
|
||||
|
||||
--revision-suffix=REVISION_SUFFIX
|
||||
Specify the suffix of the revision name. Revision names always start
|
||||
with the service name automatically. For example, specifying
|
||||
[--revision-suffix=v1] for a service named 'helloworld', would lead
|
||||
to a revision named 'helloworld-v1'.
|
||||
|
||||
--vpc-connector=VPC_CONNECTOR
|
||||
Set a VPC connector for this resource.
|
||||
|
||||
--vpc-egress=VPC_EGRESS
|
||||
The outbound traffic to send through the VPC connector for this
|
||||
resource. This resource must have a VPC connector to set VPC egress.
|
||||
VPC_EGRESS must be one of:
|
||||
|
||||
all
|
||||
(DEPRECATED) Sends all outbound traffic through the VPC
|
||||
connector. Provides the same functionality as 'all-traffic'.
|
||||
Prefer to use 'all-traffic' instead.
|
||||
all-traffic
|
||||
Sends all outbound traffic through the VPC connector.
|
||||
private-ranges-only
|
||||
Default option. Sends outbound traffic to private IP addresses
|
||||
defined by RFC1918 through the VPC connector.
|
||||
|
||||
These flags modify the Cloud SQL instances this Service connects to. You
|
||||
can specify a name of a Cloud SQL instance if it's in the same project
|
||||
and region as your Cloud Run service; otherwise specify
|
||||
<project>:<region>:<instance> for the instance.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--add-cloudsql-instances=[CLOUDSQL-INSTANCES,...]
|
||||
Append the given values to the current Cloud SQL instances.
|
||||
|
||||
--clear-cloudsql-instances
|
||||
Empty the current Cloud SQL instances.
|
||||
|
||||
--remove-cloudsql-instances=[CLOUDSQL-INSTANCES,...]
|
||||
Remove the given values from the current Cloud SQL instances.
|
||||
|
||||
--set-cloudsql-instances=[CLOUDSQL-INSTANCES,...]
|
||||
Completely replace the current Cloud SQL instances with the given
|
||||
values.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--binary-authorization=POLICY
|
||||
Binary Authorization policy to check against. This must be set to
|
||||
"default".
|
||||
|
||||
--clear-binary-authorization
|
||||
Remove any previously set Binary Authorization policy.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-key
|
||||
Remove any previously set CMEK key reference.
|
||||
|
||||
--key=KEY
|
||||
CMEK key reference to encrypt the container with.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-post-key-revocation-action-type
|
||||
Remove any previously set post CMEK key revocation action type.
|
||||
|
||||
--post-key-revocation-action-type=POST_KEY_REVOCATION_ACTION_TYPE
|
||||
Action type after CMEK key revocation.
|
||||
POST_KEY_REVOCATION_ACTION_TYPE must be one of:
|
||||
|
||||
prevent-new
|
||||
No new instances will be started after CMEK key revocation.
|
||||
shut-down
|
||||
No new instances will be started and the existing instances
|
||||
will be shut down after CMEK key revocation.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-env-vars
|
||||
Remove all environment variables.
|
||||
|
||||
--set-env-vars=[KEY=VALUE,...]
|
||||
List of key-value pairs to set as environment variables. All existing
|
||||
environment variables will be removed first.
|
||||
|
||||
Only --update-env-vars and --remove-env-vars can be used together. If
|
||||
both are specified, --remove-env-vars will be applied first.
|
||||
|
||||
--remove-env-vars=[KEY,...]
|
||||
List of environment variables to be removed.
|
||||
|
||||
--update-env-vars=[KEY=VALUE,...]
|
||||
List of key-value pairs to set as environment variables.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-labels
|
||||
Remove all labels. If --update-labels is also specified then
|
||||
--clear-labels is applied first.
|
||||
|
||||
For example, to remove all labels:
|
||||
|
||||
$ gcloud beta run services update --clear-labels
|
||||
|
||||
To remove all existing labels and create two new labels, foo and baz:
|
||||
|
||||
$ gcloud beta run services update --clear-labels \
|
||||
--update-labels foo=bar,baz=qux
|
||||
|
||||
--remove-labels=[KEY,...]
|
||||
List of label keys to remove. If a label does not exist it is
|
||||
silently ignored. If --update-labels is also specified then
|
||||
--update-labels is applied first.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--labels=[KEY=VALUE,...]
|
||||
List of label KEY=VALUE pairs to add.
|
||||
|
||||
An alias to --update-labels.
|
||||
|
||||
--update-labels=[KEY=VALUE,...]
|
||||
List of label KEY=VALUE pairs to update. If a label exists, its value
|
||||
is modified. Otherwise, a new label is created.
|
||||
|
||||
Specify secrets to mount or provide as environment variables. Keys
|
||||
starting with a forward slash '/' are mount paths. All other keys
|
||||
correspond to environment variables. Values should be in the form
|
||||
SECRET_NAME:SECRET_VERSION. For example:
|
||||
'--update-secrets=/secrets/api/key=mysecret:latest,ENV=othersecret:1' will
|
||||
mount a volume at '/secrets/api' containing a file 'key' with the latest
|
||||
version of secret 'mysecret'. An environment variable named ENV will also
|
||||
be created whose value is version 1 of secret 'othersecret'.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-secrets
|
||||
Remove all secrets.
|
||||
|
||||
--set-secrets=[KEY=VALUE,...]
|
||||
List of key-value pairs to set as secrets. All existing secrets will
|
||||
be removed first.
|
||||
|
||||
Only --update-secrets and --remove-secrets can be used together. If both
|
||||
are specified, --remove-secrets will be applied first.
|
||||
|
||||
--remove-secrets=[KEY,...]
|
||||
List of secrets to be removed.
|
||||
|
||||
--update-secrets=[KEY=VALUE,...]
|
||||
List of key-value pairs to set as secrets.
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on Google
|
||||
Cloud or Cloud Run for Anthos deployed on VMware. Specify --platform=gke
|
||||
or --platform=kubernetes to use:
|
||||
|
||||
--connectivity=CONNECTIVITY
|
||||
(DEPRECATED) Defaults to 'external'. If 'external', the service can
|
||||
be invoked through the internet, in addition to through the cluster
|
||||
network.
|
||||
|
||||
The --connectivity flag is deprecated but will continue to be
|
||||
supported. Prefer to use the --ingress flag instead. CONNECTIVITY
|
||||
must be one of:
|
||||
|
||||
external
|
||||
Visible from outside the cluster.
|
||||
internal
|
||||
Visible only within the cluster.
|
||||
|
||||
Specify config map to mount or provide as environment variables. Keys
|
||||
starting with a forward slash '/' are mount paths. All other keys
|
||||
correspond to environment variables. The values associated with each of
|
||||
these should be in the form CONFIG_MAP_NAME:KEY_IN_CONFIG_MAP; you may
|
||||
omit the key within the config map to specify a mount of all keys within
|
||||
the config map. For example:
|
||||
'--update-config-maps=/my/path=myconfig,ENV=otherconfig:key.json' will
|
||||
create a volume with config map 'myconfig' and mount that volume at
|
||||
'/my/path'. Because no config map key was specified, all keys in
|
||||
'myconfig' will be included. An environment variable named ENV will also
|
||||
be created whose value is the value of 'key.json' in 'otherconfig. Not
|
||||
supported on the fully managed version of Cloud Run.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-config-maps
|
||||
Remove all config-maps.
|
||||
|
||||
--set-config-maps=[KEY=VALUE,...]
|
||||
List of key-value pairs to set as config-maps. All existing
|
||||
config-maps will be removed first.
|
||||
|
||||
Only --update-config-maps and --remove-config-maps can be used
|
||||
together. If both are specified, --remove-config-maps will be applied
|
||||
first.
|
||||
|
||||
--remove-config-maps=[KEY,...]
|
||||
List of config-maps to be removed.
|
||||
|
||||
--update-config-maps=[KEY=VALUE,...]
|
||||
List of key-value pairs to set as config-maps.
|
||||
|
||||
Arguments to locate resources, depending on the platform used.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
Only applicable if connecting to Cloud Run (fully managed). Specify
|
||||
--platform=managed to use:
|
||||
|
||||
--region=REGION
|
||||
Region in which the resource can be found. Alternatively, set the
|
||||
property [run/region].
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on Google
|
||||
Cloud. Specify --platform=gke to use:
|
||||
|
||||
Cluster resource - Kubernetes Engine cluster to connect to. 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 --cluster on the command line with a fully
|
||||
specified name;
|
||||
▫ set the property run/cluster with a fully specified name;
|
||||
▫ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
▫ provide the argument --project on the command line;
|
||||
▫ set the property core/project.
|
||||
|
||||
--cluster=CLUSTER
|
||||
ID of the cluster or fully qualified identifier for the cluster.
|
||||
To set the cluster attribute:
|
||||
◇ provide the argument --cluster on the command line;
|
||||
◇ set the property run/cluster;
|
||||
◇ specify the cluster from a list of available clusters.
|
||||
|
||||
--cluster-location=CLUSTER_LOCATION
|
||||
Zone in which the cluster is located. Alternatively, set the
|
||||
property [run/cluster_location]. To set the location attribute:
|
||||
◇ provide the argument --cluster on the command line with a
|
||||
fully specified name;
|
||||
◇ set the property run/cluster with a fully specified name;
|
||||
◇ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
◇ provide the argument --cluster-location on the command line;
|
||||
◇ set the property run/cluster_location;
|
||||
◇ specify the cluster location from a list of available zones.
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on
|
||||
VMware. Specify --platform=kubernetes to use:
|
||||
|
||||
--context=CONTEXT
|
||||
The name of the context in your kubectl config file to use for
|
||||
connecting.
|
||||
|
||||
--kubeconfig=KUBECONFIG
|
||||
The absolute path to your kubectl config file. If not specified,
|
||||
the colon- or semicolon-delimited list of paths specified by
|
||||
$KUBECONFIG will be used. If $KUBECONFIG is unset, this defaults to
|
||||
~/.kube/config.
|
||||
|
||||
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. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud run services update
|
||||
|
||||
$ gcloud alpha run services update
|
||||
|
||||
242
gcloud/beta/run/services/update-traffic
Normal file
242
gcloud/beta/run/services/update-traffic
Normal file
|
|
@ -0,0 +1,242 @@
|
|||
NAME
|
||||
gcloud beta run services update-traffic - adjust the traffic assignments
|
||||
for a Cloud Run service
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta run services update-traffic [[SERVICE] --namespace=NAMESPACE]
|
||||
[--async] [--platform=PLATFORM; default="managed"]
|
||||
[--clear-tags | --set-tags=[TAG=REVISION,...]
|
||||
| --remove-tags=[TAG,...] --update-tags=[TAG=REVISION,...]]
|
||||
[--region=REGION
|
||||
| --cluster=CLUSTER --cluster-location=CLUSTER_LOCATION
|
||||
| --context=CONTEXT --kubeconfig=KUBECONFIG]
|
||||
[--to-latest | --to-revisions=[REVISION-NAME=PERCENTAGE,...]
|
||||
| --to-tags=[TAG=PERCENTAGE,...]] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) Adjust the traffic assignments for a Cloud Run service.
|
||||
|
||||
EXAMPLES
|
||||
To assign 10% of traffic to revision myservice-s5sxn and 90% of traffic to
|
||||
revision myservice-cp9kw run:
|
||||
|
||||
$ gcloud beta run services update-traffic myservice \
|
||||
--to-revisions=myservice-s5sxn=10,myservice-cp9kw=90
|
||||
|
||||
To increase the traffic to revision myservice-s5sxn to 20% and by reducing
|
||||
the traffic to revision myservice-cp9kw to 80% run:
|
||||
|
||||
$ gcloud beta run services update-traffic myservice \
|
||||
--to-revisions=myservice-s5sxn=20
|
||||
|
||||
To rollback to revision myservice-cp9kw run:
|
||||
|
||||
$ gcloud beta run services update-traffic myservice \
|
||||
--to-revisions=myservice-cp9kw=100
|
||||
|
||||
To assign 100% of traffic to the current or future LATEST revision run:
|
||||
|
||||
$ gcloud beta run services update-traffic myservice --to-latest
|
||||
|
||||
You can also refer to the current or future LATEST revision in
|
||||
--to-revisions by the string "LATEST". For example, to set 10% of traffic
|
||||
to always float to the latest revision:
|
||||
|
||||
$ gcloud beta run services update-traffic myservice \
|
||||
--to-revisions=LATEST=10
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Service resource - Service to update the configuration of. The arguments
|
||||
in this group can be used to specify the attributes of this resource.
|
||||
|
||||
[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;
|
||||
▸ specify the service name from an interactive prompt.
|
||||
|
||||
--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;
|
||||
▸ specify the service name from an interactive prompt 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
|
||||
--async
|
||||
Return immediately, without waiting for the operation in progress to
|
||||
complete.
|
||||
|
||||
--platform=PLATFORM; default="managed"
|
||||
Target platform for running commands. Alternatively, set the property
|
||||
[run/platform]. PLATFORM must be one of:
|
||||
|
||||
managed
|
||||
Fully managed version of Cloud Run. Use with the --region flag or
|
||||
set the [run/region] property to specify a Cloud Run region.
|
||||
gke
|
||||
Cloud Run for Anthos on Google Cloud. Use with the --cluster and
|
||||
--cluster-location flags or set the [run/cluster] and
|
||||
[run/cluster_location] properties to specify a cluster in a given
|
||||
zone.
|
||||
kubernetes
|
||||
Use a Knative-compatible kubernetes cluster. Use with the
|
||||
--kubeconfig and --context flags to specify a kubeconfig file and
|
||||
the context for connecting.
|
||||
|
||||
Specify traffic tags. Traffic tags can be assigned to a revision by name
|
||||
or to the latest ready revision. Assigning a tag to a revision generates a
|
||||
URL prefixed with the tag that allows addressing that revision directly,
|
||||
regardless of the percent traffic specified. Keys are tags. Values are
|
||||
revision names or "LATEST" for the latest ready revision. For example,
|
||||
--set-tags=candidate=LATEST,current=myservice-v1 assigns the tag
|
||||
"candidate" to the latest ready revision and the tag "current" to the
|
||||
revision with name "myservice-v1" and clears any existing tags. Changing
|
||||
tags does not affect the traffic percentage assigned to revisions. When
|
||||
using a tags flag and one or more of --to-latest and --to-revisions in the
|
||||
same command, the tags change occurs first then the traffic percentage
|
||||
change occurs.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-tags
|
||||
Remove all tags.
|
||||
|
||||
--set-tags=[TAG=REVISION,...]
|
||||
List of key-value pairs to set as tags. All existing tags will be
|
||||
removed first.
|
||||
|
||||
Only --update-tags and --remove-tags can be used together. If both are
|
||||
specified, --remove-tags will be applied first.
|
||||
|
||||
--remove-tags=[TAG,...]
|
||||
List of tags to be removed.
|
||||
|
||||
--update-tags=[TAG=REVISION,...]
|
||||
List of key-value pairs to set as tags.
|
||||
|
||||
Arguments to locate resources, depending on the platform used.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
Only applicable if connecting to Cloud Run (fully managed). Specify
|
||||
--platform=managed to use:
|
||||
|
||||
--region=REGION
|
||||
Region in which the resource can be found. Alternatively, set the
|
||||
property [run/region].
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on Google
|
||||
Cloud. Specify --platform=gke to use:
|
||||
|
||||
Cluster resource - Kubernetes Engine cluster to connect to. 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 --cluster on the command line with a fully
|
||||
specified name;
|
||||
▫ set the property run/cluster with a fully specified name;
|
||||
▫ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
▫ provide the argument --project on the command line;
|
||||
▫ set the property core/project.
|
||||
|
||||
--cluster=CLUSTER
|
||||
ID of the cluster or fully qualified identifier for the cluster.
|
||||
To set the cluster attribute:
|
||||
◇ provide the argument --cluster on the command line;
|
||||
◇ set the property run/cluster;
|
||||
◇ specify the cluster from a list of available clusters.
|
||||
|
||||
--cluster-location=CLUSTER_LOCATION
|
||||
Zone in which the cluster is located. Alternatively, set the
|
||||
property [run/cluster_location]. To set the location attribute:
|
||||
◇ provide the argument --cluster on the command line with a
|
||||
fully specified name;
|
||||
◇ set the property run/cluster with a fully specified name;
|
||||
◇ specify the cluster from a list of available clusters with a
|
||||
fully specified name;
|
||||
◇ provide the argument --cluster-location on the command line;
|
||||
◇ set the property run/cluster_location;
|
||||
◇ specify the cluster location from a list of available zones.
|
||||
|
||||
Only applicable if connecting to Cloud Run for Anthos deployed on
|
||||
VMware. Specify --platform=kubernetes to use:
|
||||
|
||||
--context=CONTEXT
|
||||
The name of the context in your kubectl config file to use for
|
||||
connecting.
|
||||
|
||||
--kubeconfig=KUBECONFIG
|
||||
The absolute path to your kubectl config file. If not specified,
|
||||
the colon- or semicolon-delimited list of paths specified by
|
||||
$KUBECONFIG will be used. If $KUBECONFIG is unset, this defaults to
|
||||
~/.kube/config.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--to-latest
|
||||
True to assign 100 percent of traffic to the 'latest' revision of
|
||||
this service. Note that when a new revision is created, it will
|
||||
become the 'latest' and traffic will be directed to it. Defaults to
|
||||
False. Synonymous with '--to-revisions=LATEST=100'.
|
||||
|
||||
--to-revisions=[REVISION-NAME=PERCENTAGE,...]
|
||||
Comma separated list of traffic assignments in the form
|
||||
REVISION-NAME=PERCENTAGE. REVISION-NAME must be the name for a
|
||||
revision for the service as returned by 'gcloud beta run list
|
||||
revisions'. PERCENTAGE must be an integer percentage between 0 and
|
||||
100 inclusive. Ex service-nw9hs=10,service-nw9hs=20 Up to 100 percent
|
||||
of traffic may be assigned. If 100 percent of traffic is assigned,
|
||||
the Service traffic is updated as specified. If under 100 percent of
|
||||
traffic is assigned, the Service traffic is updated as specified for
|
||||
revisions with assignments and traffic is scaled up or down down
|
||||
proportionally as needed for revision that are currently serving
|
||||
traffic but that do not have new assignments. For example assume
|
||||
revision-1 is serving 40 percent of traffic and revision-2 is serving
|
||||
60 percent. If revision-1 is assigned 45 percent of traffic and no
|
||||
assignment is made for revision-2, the service is updated with
|
||||
revsion-1 assigned 45 percent of traffic and revision-2 scaled down
|
||||
to 55 percent. You can use "LATEST" as a special revision name to
|
||||
always put the given percentage of traffic on the latest ready
|
||||
revision.
|
||||
|
||||
--to-tags=[TAG=PERCENTAGE,...]
|
||||
Comma separated list of traffic assignments in the form
|
||||
TAG=PERCENTAGE. TAG must match a traffic tag on a revision of the
|
||||
service. It may match a previously-set tag, or one assigned using the
|
||||
--set-tags or --update-tags flags on this command. PERCENTAGE must be
|
||||
an integer percentage between 0 and 100 inclusive. Up to 100 percent
|
||||
of traffic may be assigned. If 100 percent of traffic is assigned,
|
||||
the service traffic is updated as specified. If under 100 percent of
|
||||
traffic is assigned, the service traffic is updated as specified to
|
||||
the given tags, and other traffic is scaled up or down
|
||||
proportionally. For example, assume the revision tagged next is
|
||||
serving 40 percent of traffic and the revision tagged current is
|
||||
serving 60 percent. If next is assigned 45 percent of traffic and no
|
||||
assignment is made for current, the service is updated with next
|
||||
assigned 45 percent of traffic and current scaled down to 55 percent.
|
||||
|
||||
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. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud run services update-traffic
|
||||
|
||||
$ gcloud alpha run services update-traffic
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue