sincecutoff.com
← all changes

gcloud beta run commands add ephemeral-disk volumes

Introduced 2026-04-07 · score 0.91

HOW TO USE IT

When configuring a Cloud Run service, job, or worker pool with an ephemeral disk, use the beta `gcloud run` command with `--add-volume` and `--add-volume-mount` to define and mount it.

gcloud beta run services update <SERVICE> --execution-environment=gen2 --add-volume=name=<VOLUME_NAME>,type=ephemeral-disk,size=<SIZE> --add-volume-mount=volume=<VOLUME_NAME>,mount-path=<MOUNT_PATH>
gcloud beta run jobs update <JOB> --add-volume=name=<VOLUME_NAME>,type=ephemeral-disk,size=<SIZE> --add-volume-mount=volume=<VOLUME_NAME>,mount-path=<MOUNT_PATH>
gcloud beta run worker-pools update <WORKER_POOL> --add-volume=name=<VOLUME_NAME>,type=ephemeral-disk,size=<SIZE> --add-volume-mount=volume=<VOLUME_NAME>,mount-path=<MOUNT_PATH>

WHY THIS HELPS

Deploy or update a Cloud Run service, job, or worker pool with an ephemeral-disk volume.

REQUIREMENTS AND LIMITATIONS

  • Availability: In beta.
  • --add-volume (required): Adds a volume; repeat the flag to add more. Its value must include `type`; `name` is required when `mount-path` is omitted and optional when `mount-path` is specified.
  • type (required): Set to `ephemeral-disk` for this volume type.
  • name (required): Volume name; required if `mount-path` is omitted, otherwise optional.
  • size: Disk space allocated to the volume; docs give `10Gi` or `100G` as examples. The ephemeral disk guide specifies 1Gi–100Gi.
  • mount-path: Path at which the volume is mounted. For multi-container services, specify it under `--add-volume-mount`.
  • --add-volume-mount (required): Adds a mount; value must include `volume=<NAME>` and `mount-path=<PATH>`.
  • volume (required): Name of a volume on the resource to mount.
  • mount-path (required): Path in the container filesystem where the volume is mounted.
  • --execution-environment (required): For service ephemeral disks, set to `gen2`; ephemeral disks are only available in the second generation execution environment.
  • Prerequisite: Install and initialize the gcloud CLI, update components, and enable billing for the project.
  • Prerequisite: For services, required roles are Cloud Run Developer (`roles/run.developer`) on the service and Service Account User (`roles/iam.serviceAccountUser`) on the service identity.
  • Prerequisite: Ephemeral disks require the second generation execution environment; each volume must be 1Gi–100Gi.
  • Applies to volumes with `type=ephemeral-disk`.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card