gcloud_alpha_run_deploy (1)
NAME
- gcloud alpha run deploy - deploy an app, function or container to Cloud Run
SYNOPSIS
-
gcloud alpha run deploy [[SERVICE] --namespace=NAMESPACE] [--async] [--concurrency=CONCURRENCY] [--image=IMAGE] [--memory=MEMORY] [--region=REGION] [--clear-env-vars | --set-env-vars=[KEY=VALUE,...] | --remove-env-vars=[KEY,...] --update-env-vars=[KEY=VALUE,...]] [--cluster=CLUSTER --cluster-location=CLUSTER_LOCATION] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) Deploys container images to Google Cloud Run.
POSITIONAL ARGUMENTS
-
-
- Service resource - Service to deploy to. 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.
- --namespace=NAMESPACE
-
Specific to Cloud Run on Kubernetes Engine: The Kubernetes namespace for the
service
- Service resource - Service to deploy to. The arguments in this group can be used to specify the attributes of this resource.
-
FLAGS
-
- --async
-
True to deploy asynchronously.
- --concurrency=CONCURRENCY
-
Set the number of concurrent requests allowed per instance. A concurrency of 0
indicates any number of concurrent requests are allowed. To unset this field,
provide the special value default.
- --image=IMAGE
-
The path to the GCR container to deploy.
- --memory=MEMORY
-
Set a memory limit. Ex: 1Gi, 512Mi.
- --region=REGION
-
The region in which to create the service.
-
At most one of these may 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.
-
-
-
Cluster resource - Specific to Cloud Run on Kubernetes Engine: The 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; 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-location=CLUSTER_LOCATION
-
Specific to Cloud Run on Kubernetes Engine: The location of the cluster.
-
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
EXAMPLES
To deploy a container to the service my-backend on Cloud Run:
- $ gcloud alpha run deploy my-backend --image gcr.io/my/image
You may also omit the service name. Then a prompt will be displayed with a suggested default value:
- $ gcloud alpha run deploy --image gcr.io/my/image
To deploy to Cloud Run on Kubernetes Engine, you need to specify a cluster:
-
$ gcloud alpha run deploy --image gcr.io/my/image \
--cluster my-cluster
NOTES
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support