mirror of
https://github.com/imjasonh/gcloud-help
synced 2026-07-17 22:36:52 +00:00
gcloud: Wed Feb 7 10:26:58 UTC 2024
This commit is contained in:
parent
40bc27506b
commit
3efce28165
109 changed files with 4100 additions and 399 deletions
|
|
@ -3,18 +3,26 @@ NAME
|
|||
other configuration settings
|
||||
|
||||
SYNOPSIS
|
||||
gcloud run services update [[SERVICE] --namespace=NAMESPACE]
|
||||
[--args=[ARG,...]] [--async] [--command=[COMMAND,...]]
|
||||
[--concurrency=CONCURRENCY] [--cpu=CPU] [--image=IMAGE]
|
||||
gcloud run services update [[SERVICE] --namespace=NAMESPACE] [--async]
|
||||
[--concurrency=CONCURRENCY] [--container=CONTAINER]
|
||||
[--ingress=INGRESS; default="all"] [--max-instances=MAX_INSTANCES]
|
||||
[--memory=MEMORY] [--min-instances=MIN_INSTANCES]
|
||||
[--platform=PLATFORM; default="managed"] [--port=PORT]
|
||||
[--min-instances=MIN_INSTANCES]
|
||||
[--platform=PLATFORM; default="managed"]
|
||||
[--service-account=SERVICE_ACCOUNT] [--tag=TAG] [--timeout=TIMEOUT]
|
||||
[--no-traffic] [--[no-]use-http2]
|
||||
[--no-traffic]
|
||||
[--args=[ARG,...] --command=[COMMAND,...] --cpu=CPU
|
||||
--depends-on=[CONTAINER,...] --image=IMAGE
|
||||
--memory=MEMORY --port=PORT --[no-]use-http2 --clear-env-vars
|
||||
| --env-vars-file=FILE_PATH | --set-env-vars=[KEY=VALUE,...]
|
||||
| --remove-env-vars=[KEY,...]
|
||||
--update-env-vars=[KEY=VALUE,...] --clear-secrets
|
||||
| --set-secrets=[KEY=VALUE,...]
|
||||
| --remove-secrets=[KEY,...] --update-secrets=[KEY=VALUE,...]]
|
||||
[--breakglass=JUSTIFICATION --clear-vpc-connector --[no-]cpu-boost
|
||||
--[no-]cpu-throttling --execution-environment=EXECUTION_ENVIRONMENT
|
||||
--revision-suffix=REVISION_SUFFIX --[no-]session-affinity
|
||||
--vpc-connector=VPC_CONNECTOR --vpc-egress=VPC_EGRESS
|
||||
--remove-containers=[CONTAINER,...] --revision-suffix=REVISION_SUFFIX
|
||||
--[no-]session-affinity --vpc-connector=VPC_CONNECTOR
|
||||
--vpc-egress=VPC_EGRESS
|
||||
--add-cloudsql-instances=[CLOUDSQL-INSTANCES,...]
|
||||
| --clear-cloudsql-instances
|
||||
| --remove-cloudsql-instances=[CLOUDSQL-INSTANCES,...]
|
||||
|
|
@ -28,13 +36,8 @@ SYNOPSIS
|
|||
| --encryption-key-shutdown-hours=ENCRYPTION_KEY_SHUTDOWN_HOURS
|
||||
--clear-key | --key=KEY --clear-post-key-revocation-action-type
|
||||
| --post-key-revocation-action-type=POST_KEY_REVOCATION_ACTION_TYPE]
|
||||
[--clear-env-vars | --env-vars-file=FILE_PATH
|
||||
| --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,...]]
|
||||
|
|
@ -79,39 +82,18 @@ POSITIONAL ARGUMENTS
|
|||
▸ 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).
|
||||
--container=CONTAINER
|
||||
Specifies a container by name. Flags following --container will apply
|
||||
to the specified container.
|
||||
|
||||
--ingress=INGRESS; default="all"
|
||||
Set the ingress traffic sources allowed to call the service. For Cloud
|
||||
|
|
@ -141,9 +123,6 @@ FLAGS
|
|||
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 for this Revision of the
|
||||
Service to run or 'default' to remove any minimum.
|
||||
|
|
@ -165,13 +144,6 @@ FLAGS
|
|||
--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". If updating an existing
|
||||
service with a TCP startup probe pointing to the previous container
|
||||
port, this will also update the probe port.
|
||||
|
||||
--service-account=SERVICE_ACCOUNT
|
||||
Service account associated with the revision of the service. The
|
||||
service account represents the identity of the running revision, and
|
||||
|
|
@ -202,9 +174,106 @@ FLAGS
|
|||
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.
|
||||
If the --container or --remove-containers flag is specified the following
|
||||
arguments may only be specified after a --container flag.
|
||||
|
||||
--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.
|
||||
|
||||
--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.
|
||||
|
||||
--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
|
||||
|
||||
--depends-on=[CONTAINER,...]
|
||||
List of container dependencies to add to the current container.
|
||||
|
||||
--image=IMAGE
|
||||
Name of the container image to deploy (e.g.
|
||||
gcr.io/cloudrun/hello:latest).
|
||||
|
||||
--memory=MEMORY
|
||||
Set a memory limit. Ex: 1024Mi, 4Gi.
|
||||
|
||||
--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".
|
||||
If updating an existing service with a TCP startup probe pointing
|
||||
to the previous container port, this will also update the probe
|
||||
port.
|
||||
|
||||
--[no-]use-http2
|
||||
Whether to use HTTP/2 for connections to the service. Use
|
||||
--use-http2 to enable and --no-use-http2 to disable.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-env-vars
|
||||
Remove all environment variables.
|
||||
|
||||
--env-vars-file=FILE_PATH
|
||||
Path to a local YAML file with definitions for all environment
|
||||
variables. All existing environment variables will be removed
|
||||
before the new environment variables are added. Example YAML
|
||||
content:
|
||||
|
||||
KEY_1: "value1"
|
||||
KEY_2: "value 2"
|
||||
|
||||
--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.
|
||||
|
||||
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 (fully managed). Specify
|
||||
--platform=managed to use:
|
||||
|
|
@ -239,6 +308,9 @@ FLAGS
|
|||
gen2
|
||||
Run the application in a second generation execution environment.
|
||||
|
||||
--remove-containers=[CONTAINER,...]
|
||||
List of containers to remove.
|
||||
|
||||
--revision-suffix=REVISION_SUFFIX
|
||||
Specify the suffix of the revision name. Revision names always start
|
||||
with the service name automatically. For example, specifying
|
||||
|
|
@ -355,32 +427,6 @@ FLAGS
|
|||
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.
|
||||
|
||||
--env-vars-file=FILE_PATH
|
||||
Path to a local YAML file with definitions for all environment
|
||||
variables. All existing environment variables will be removed before
|
||||
the new environment variables are added. Example YAML content:
|
||||
|
||||
KEY_1: "value1"
|
||||
KEY_2: "value 2"
|
||||
|
||||
--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
|
||||
|
|
@ -412,33 +458,6 @@ FLAGS
|
|||
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:
|
||||
|
|
@ -509,35 +528,36 @@ FLAGS
|
|||
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.
|
||||
▸ 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.
|
||||
--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.
|
||||
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].
|
||||
--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.
|
||||
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue