Manage worker pools

This page describes viewing information about a worker pool, and deleting worker pools.

Required roles

To get the permissions that you need to manage Cloud Run worker pools and worker pool revisions, ask your administrator to grant you the Cloud Run Developer (roles/run.developer) IAM role on your Cloud Run worker pool.

For a list of IAM roles and permissions that are associated with Cloud Run, see Cloud Run IAM roles and Cloud Run IAM permissions. If your Cloud Run worker pool interfaces with Google Cloud APIs, such as Cloud Client Libraries, see the service identity configuration guide. For more information about granting roles, see deployment permissions and manage access.

Create a worker pool

Cloud Run creates a new worker pool the first time you deploy a container image. See Deploy a new worker pool for more instructions.

View the list of worker pools in your project

Use the Google Cloud CLI to view a list of the available worker pools in your project:

gcloud

To list the worker pools in your project:

gcloud beta run worker-pools list

You can filter this list by properties of the worker pool definition, such as an assigned label.

View more details about a worker pool

Use the Google Cloud CLI to see more details about a worker pool:

gcloud

To view details about a worker pool:

gcloud beta run worker-pools describe WORKER_POOL
Replace WORKER_POOL with the name of the worker pool.

You can use the --format flag to format the output. For example, to format the output as YAML:

gcloud beta run worker-pools describe WORKER_POOL
    --region REGION
    --format yaml

Replace:

  • WORKER_POOL with the name of the worker pool.
  • REGION with the Google Cloud region of the worker pool.

Disable an existing worker pool

Disabling a worker pool shuts down all instances for that worker pool. To disable a worker pool, use the following command to set scaling to zero:

gcloud beta run worker-pools update WORKER_POOL --scaling=0

Replace WORKER_POOL with the name of your worker pool.

Delete existing worker pools

The following considerations apply to deleting a worker pool:

  • Deleting a worker pool deletes all resources related to this worker pool, including all revisions of this worker pool whether they are processing workloads or not.
  • Deleting a worker pool does not automatically remove container images from Artifact Registry. To delete container images used by the deleted revisions from Artifact Registry, refer to Deleting images.
  • After you delete a worker pool, the worker pool remains visible in the Google Cloud CLI until the deletion is fully complete. However, you cannot update the worker pool.
  • Deleting a worker pool is permanent. There is no undo or restore.

gcloud

To delete a worker pool, use the command:

gcloud beta run worker-pools delete WORKER_POOL --region REGION

Replace:

  • WORKER_POOL with the name of your worker pool.
  • REGION with the Google Cloud region of the worker pool.