1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-18 06:47:12 +00:00

gcloud: Thu Sep 7 10:42:28 UTC 2023

This commit is contained in:
Automated 2023-09-07 10:42:28 +00:00
parent f9edf67fe5
commit 6c8d2eb024
307 changed files with 4053 additions and 1615 deletions

View file

@ -2,25 +2,17 @@ NAME
gcloud alpha run deploy - create or update a Cloud Run service
SYNOPSIS
gcloud alpha run deploy [[SERVICE] --namespace=NAMESPACE]
[--args=[ARG,...]] [--async] [--command=[COMMAND,...]]
[--concurrency=CONCURRENCY] [--cpu=CPU]
[--ingress=INGRESS; default="all"] [--max-instances=MAX_INSTANCES]
[--memory=MEMORY] [--min-instances=MIN_INSTANCES]
[--platform=PLATFORM; default="managed"] [--port=PORT]
gcloud alpha run deploy [[SERVICE] --namespace=NAMESPACE] [--async]
[--concurrency=CONCURRENCY] [--ingress=INGRESS; default="all"]
[--max-instances=MAX_INSTANCES] [--min-instances=MIN_INSTANCES]
[--platform=PLATFORM; default="managed"]
[--service-account=SERVICE_ACCOUNT] [--tag=TAG] [--timeout=TIMEOUT]
[--no-traffic] [--[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,...]]
[--no-traffic]
[--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,...]]
[--image=IMAGE | --source=SOURCE]
[--[no-]allow-unauthenticated --breakglass=JUSTIFICATION
--clear-vpc-connector --[no-]cpu-boost --[no-]cpu-throttling
--description=DESCRIPTION
@ -41,7 +33,15 @@ SYNOPSIS
--clear-key | --key=KEY --clear-network
| --network=NETWORK --subnet=SUBNET --clear-network-tags
| --network-tags=[TAG,...] --clear-post-key-revocation-action-type
| --post-key-revocation-action-type=POST_KEY_REVOCATION_ACTION_TYPE]
| --post-key-revocation-action-type=POST_KEY_REVOCATION_ACTION_TYPE
--container=CONTAINER | --args=[ARG,...] --command=[COMMAND,...]
--cpu=CPU
--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,...] --image=IMAGE | --source=SOURCE]
[--region=REGION
| --cluster=CLUSTER --cluster-location=CLUSTER_LOCATION
| --context=CONTEXT --kubeconfig=KUBECONFIG] [GCLOUD_WIDE_FLAG ...]
@ -93,36 +93,15 @@ 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
--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
@ -151,9 +130,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.
@ -175,13 +151,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
@ -212,36 +181,6 @@ 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.
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
@ -273,33 +212,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:
@ -350,27 +262,6 @@ FLAGS
--update-config-maps=[KEY=VALUE,...]
List of key-value pairs to set as config-maps.
At most one of these can be specified:
--image=IMAGE
Name of the container image to deploy (e.g.
gcr.io/cloudrun/hello:latest).
--source=SOURCE
The location of the source to build. If a Dockerfile is present in
the source code directory, it will be built using that Dockerfile,
otherwise it will use Google Cloud buildpacks. See
https://cloud.google.com/run/docs/deploying-source-code for more
details. The location can be a directory on a local disk or a gzipped
archive file (.tar.gz) in Google Cloud Storage. If the source is a
local directory, this command skips the files specified in the
--ignore-file. If --ignore-file is not specified, use .gcloudignore
file. If a .gcloudignore file is absent and a .gitignore file is
present in the local source directory, gcloud will use a generated
Git-compatible .gcloudignore file that respects your .gitignored
files. The global .gitignore is not respected. For more information
on .gcloudignore, see gcloud topic gcloudignore.
Only applicable if connecting to Cloud Run (fully managed). Specify
--platform=managed to use:
@ -553,6 +444,143 @@ FLAGS
No new instances will be started and the existing instances
will be shut down after CMEK key revocation.
Container Flags
If the --container flag is not specified, container flags apply to the
primary container.
Multiple containers can specified using --container=<NAME> followed by the
container flags applying to that container. For example the following
command creates two containers, one using IMAGE-A and one using IMAGE-B:
$ gcloud alpha run deploy --container=A --image=IMAGE-A \
--container=B --image=IMAGE-B
--container=CONTAINER
Specifies a container by name. The following container flags
apply to the specified container.
If the --container 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
--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.
At most one of these can be specified:
--image=IMAGE
Name of the container image to deploy (e.g.
gcr.io/cloudrun/hello:latest).
--source=SOURCE
The location of the source to build. If a Dockerfile is
present in the source code directory, it will be built
using that Dockerfile, otherwise it will use Google Cloud
buildpacks. See
https://cloud.google.com/run/docs/deploying-source-code for
more details. The location can be a directory on a local
disk or a gzipped archive file (.tar.gz) in Google Cloud
Storage. If the source is a local directory, this command
skips the files specified in the --ignore-file. If
--ignore-file is not specified, use .gcloudignore file. If
a .gcloudignore file is absent and a .gitignore file is
present in the local source directory, gcloud will use a
generated Git-compatible .gcloudignore file that respects
your .gitignored files. The global .gitignore is not
respected. For more information on .gcloudignore, see
gcloud topic gcloudignore.
Arguments to locate resources, depending on the platform used.
At most one of these can be specified: