Managing Revisions

When you deploy to a service or change the configuration of a service, an immutable revision is created. Only the latest created revision is active and served by the service's URL.

Viewing the list of revisions for a service

Console

To view the list of revisions in your project:

  1. Go to Cloud Run

  2. Locate the service in the services list, and click on it.

  3. Click the Revisions tab to show the list of current revisions for that service.

    revision list

Command line

To view the list of revisions for a given service:

  1. Find your service name from the list of services available in your project:

    gcloud beta run services list
    
  2. Use the following command to get all the revisions for the service you just looked up:

    gcloud beta run revisions list --service [SERVICE]
    

    Replace [SERVICE] with the name of your service.

Viewing revision details

Console

To view the details for a revision in your project:

  1. Go to Cloud Run

  2. Locate the service in the services list, and click on it.

  3. Click the Revisions tab to show the list of current revisions for that service.

  4. Select the service revision you are interested in:

  5. Examine the DETAILS panel at the far right for revision-specific information such as the URL of the deployed container image, amount of memory allocated, and environment variables:

    image

Command line

To view the details for a revision in your project:

  1. Find your service name from the list of services available in your project:

    gcloud beta run services list
    
  2. Use the following command to get all the revisions for the service you just looked up:

    gcloud beta run revisions list --service [SERVICE]
    

    Replace [SERVICE] with the name of your service.

  3. Use the following command to see more details about a specific revision:

    gcloud beta run revisions describe [REVISION NAME]
    

    Replace [REVISION NAME] with the name of the revision you want to learn more about.

Note that a non-current revision may have the status of RETIRED, which means that Cloud Run has retired the infrastructure needed for that particular revision.

Deleting revisions

A common use case for deleting a revision is when you want to make sure a particular revision won't be accidentally used. Note that you can only delete revisions that are not serving requests: you cannot delete the currently active revision for a service.

When you delete a revision, the container image used by this revision is not deleted automatically from Container Registry. To delete a container image from Container Registry see Deleting images.

You cannot undo a revision deletion.

You can use either the console or the command line:

Console

To delete a revision

  1. Go to Cloud Run

  2. Locate the service in the services list, and click on it.

  3. Click the Revisions tab to show the list of current revisions for that service.

  4. Locate the service revision you want to delete.

  5. Click the three-dot vertical ellipse to the left of the revision to show the Delete menu.

    revision-delete

  6. Click Delete to delete the revision.

Command line

To delete a revision, use the following command:

gcloud beta run revisions delete [REVISION NAME]

Replace [REVISION NAME] with the name of the revision you want to delete.

本頁內容對您是否有任何幫助?請提供意見:

傳送您對下列選項的寶貴意見...

這個網頁
Cloud Run Documentation