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 console or the Google Cloud CLI to view a list of the available worker pools in your project:

console

  1. In the Google Cloud console, go to Cloud Run:

    Go to Cloud Run

  2. Select Worker pools from the menu. The available worker pools are listed in the page.

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:

console

  1. In the Google Cloud console, go to Cloud Run:

    Go to Cloud Run

  2. Select Worker pools from the menu to display the available worker pools.

  3. Click the worker pool to display its details pane.

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, set scaling to zero:

console

  1. In the Google Cloud console, go to Cloud Run:

    Go to Cloud Run

  2. Select Worker pools from the menu, then from the list of worker pools, click on the worker pool you want to disable.

  3. Click the pen icon at the right of Scaling: Manual (Instances: ) and change the value to 0.

  4. Click Save to update and disable the worker pool.

gcloud

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.

console

  1. In the Google Cloud console, go to Cloud Run:

    Go to Cloud Run

  2. Select Worker pools from the menu, then from the list of worker pools, select the worker pool you want to delete.

  3. Click Delete.

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.