--account <ACCOUNT> | Google Cloud Platform user account to use for invocation. Overrides the default *core/account* property value for this command invocation |
--add-cloudsql-instances <CLOUDSQL-INSTANCES> | Append the given values to the current Cloud SQL instances |
--allow-unauthenticated | Whether to enable allowing unauthenticated access to the service. This may take a few moments to take effect. Use *--allow-unauthenticated* to enable and *--no-allow-unauthenticated* to disable |
--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 |
--billing-project <BILLING_PROJECT> | The Google Cloud Platform project that will be charged quota for operations performed in gcloud. If you need to operate on one project, but need quota against a different project, you can use this flag to specify the billing project. If both `billing/quota_project` and `--billing-project` are specified, `--billing-project` takes precedence. Run `$ gcloud config set --help` to see more information about `billing/quota_project` |
--clear-cloudsql-instances | Empty the current Cloud SQL instances |
--clear-config-maps | Remove all config-maps |
--clear-env-vars | Remove all environment variables |
--clear-labels | Remove all labels. If `--update-labels` is also specified then
`--clear-labels` is applied first.
+
For example, to remove all labels:
+
$ {command} --clear-labels
+
To set the labels to exactly "foo" and "baz":
+
$ {command} --clear-labels --update-labels foo=bar,baz=qux |
--clear-secrets | Remove all secrets |
--clear-vpc-connector | Remove the VPC connector for this Service |
--cluster <CLUSTER> | ID of the cluster or fully qualified identifier for the cluster |
--cluster-location <CLUSTER_LOCATION> | Zone in which the cluster is located. Alternatively, set the property [run/cluster_location] |
--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. If concurrency is unspecified, any number of concurrent requests are allowed. To unset this field, provide the special value `default` |
--configuration <CONFIGURATION> | The configuration to use for this command invocation. For more
information on how to use configurations, run:
`gcloud topic configurations`. You can also use the CLOUDSDK_ACTIVE_CONFIG_NAME environment
variable to set the equivalent of this flag for a terminal
session |
--connectivity <CONNECTIVITY> | Defaults to 'external'. If 'external', the service can be invoked through the internet, in addition to through the cluster network. _CONNECTIVITY_ must be one of:
+
*external*::: Visible from outside the cluster.
*internal*::: Visible only within the cluster.
:::
+ |
--context <CONTEXT> | The name of the context in your kubectl config file to use for connecting |
--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 |
--flags-file <YAML_FILE> | A YAML or JSON file that specifies a *--flag*:*value* dictionary.
Useful for specifying complex flag values with special characters
that work with any command interpreter. Additionally, each
*--flags-file* arg is replaced by its constituent flags. See
$ gcloud topic flags-file for more information |
--flatten <KEY> | Flatten _name_[] output resource slices in _KEY_ into separate records
for each item in each slice. Multiple keys and slices may be specified.
This also flattens keys for *--format* and *--filter*. For example,
*--flatten=abc.def* flattens *abc.def[].ghi* references to
*abc.def.ghi*. A resource record containing *abc.def[]* with N elements
will expand to N records in the flattened output. This flag interacts
with other flags that are applied in this order: *--flatten*,
*--sort-by*, *--filter*, *--limit* |
--format <FORMAT> | Set the format for printing command output resources. The default is a
command-specific human-friendly output format. The supported formats
are: `config`, `csv`, `default`, `diff`, `disable`, `flattened`, `get`, `json`, `list`, `multi`, `none`, `object`, `table`, `text`, `value`, `yaml`. For more details run $ gcloud topic formats |
--help | Display detailed help |
--image <IMAGE> | Name of the container image to deploy (e.g. `gcr.io/cloudrun/hello:latest`) |
--impersonate-service-account <SERVICE_ACCOUNT_EMAIL> | For this gcloud invocation, all API requests will be made as the given service account instead of the currently selected account. This is done without needing to create, download, and activate a key for the account. In order to perform operations as the service account, your currently selected account must have an IAM role that includes the iam.serviceAccounts.getAccessToken permission for the service account. The roles/iam.serviceAccountTokenCreator role has this permission or you may create a custom role. Overrides the default *auth/impersonate_service_account* property value for this command invocation |
--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` |
--labels <KEY=VALUE> | List of label KEY=VALUE pairs to add.
+
An alias to --update-labels |
--log-http | Log all HTTP server requests and responses to stderr. Overrides the default *core/log_http* property value for this command invocation |
--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: 1Gi, 512Mi |
--min-instances <MIN_INSTANCES> | The minimum number of container instances of the Service to run or 'default' to remove any minimum |
--namespace <NAMESPACE> | Specific to Cloud Run for Anthos: Kubernetes namespace for the service |
--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` |
--platform <PLATFORM> | Target platform for running commands. Alternatively, set the property [run/platform]. If not specified, the user will be prompted to choose a 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" |
--project <PROJECT_ID> | The Google Cloud Platform project ID to use for this invocation. If
omitted, then the current project is assumed; the current project can
be listed using `gcloud config list --format='text(core.project)'`
and can be set using `gcloud config set project PROJECTID`.
+
`--project` and its fallback `core/project` property play two roles
in the invocation. It specifies the project of the resource to
operate on. It also specifies the project for API enablement check,
quota, and billing. To specify a different project for quota and
billing, use `--billing-project` or `billing/quota_project` property |
--quiet | Disable all interactive prompts when running gcloud commands. If input
is required, defaults will be used, or an error will be raised.
Overrides the default core/disable_prompts property value for this
command invocation. This is equivalent to setting the environment
variable `CLOUDSDK_CORE_DISABLE_PROMPTS` to 1 |
--region <REGION> | Region in which the resource can be found. Alternatively, set the property [run/region] |
--remove-cloudsql-instances <CLOUDSQL-INSTANCES> | Remove the given values from the current Cloud SQL instances |
--remove-config-maps <KEY> | List of config-maps to be removed |
--remove-env-vars <KEY> | List of environment variables to be removed |
--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
`--remove-labels` is applied first |
--remove-secrets <KEY> | List of secrets to be removed |
--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' |
--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 |
--set-cloudsql-instances <CLOUDSQL-INSTANCES> | Completely replace the current Cloud SQL instances with the given values |
--set-config-maps <KEY=VALUE> | List of key-value pairs to set as config-maps. All existing config-maps will be removed first |
--set-env-vars <KEY=VALUE> | List of key-value pairs to set as environment variables. All existing environment variables will be removed first |
--set-secrets <KEY=VALUE> | List of key-value pairs to set as secrets. All existing secrets will be removed first |
--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 |
--trace-token <TRACE_TOKEN> | Token used to route traces of service requests for investigation of issues. Overrides the default *core/trace_token* property value for this command invocation |
--update-config-maps <KEY=VALUE> | List of key-value pairs to set as config-maps |
--update-env-vars <KEY=VALUE> | List of key-value pairs to set as environment variables |
--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 |
--update-secrets <KEY=VALUE> | List of key-value pairs to set as secrets |
--use-http2 | Whether to use HTTP/2 for connections to the service. Use *--use-http2* to enable and *--no-use-http2* to disable |
--user-output-enabled | Print user intended output to the console. Overrides the default *core/user_output_enabled* property value for this command invocation. Use *--no-user-output-enabled* to disable |
--verbosity <VERBOSITY> | Override the default verbosity for this command. Overrides the default *core/verbosity* property value for this command invocation. _VERBOSITY_ must be one of: *debug*, *info*, *warning*, *error*, *critical*, *none* |
--vpc-connector <VPC_CONNECTOR> | Set a VPC connector for this Service |