Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Lorsque vous déployez sur un service ou modifiez la configuration d'un service, une révision immuable est créée.
Les considérations suivantes s'appliquent aux révisions :
Vous pouvez indiquer si une nouvelle révision reçoit tout ou partie du trafic, ou n'en reçoit pas du tout. Vous pouvez également déployer progressivement une nouvelle révision, répartir le trafic entre plusieurs révisions et effectuer un rollback à partir d'une révision. Pour en savoir plus, consultez la page Rollbacks, déploiements progressifs et migration du trafic.
Vous pouvez éventuellement utiliser des tags de révision pour tester une révision qui ne diffuse pas de trafic.
Les révisions inactives ne consomment aucune ressource et ne sont pas facturées.
Le nombre maximal de révisions par service est de 1 000. Si vous dépassez cette limite, les anciennes révisions sont automatiquement supprimées.
Le suffixe de révision est attribué automatiquement. Si vous souhaitez utiliser votre propre suffixe, vous pouvez utiliser le faire en utilisant le paramètre de Google Cloud CLI --revision-suffix.
Afficher la liste des révisions pour un service
Console
Pour afficher la liste des révisions dans votre projet, procédez comme suit :
Accédez à Knative serving dans la console Google Cloud :
Localisez le service dans la liste des services, puis cliquez dessus.
Cliquez sur l'onglet Revisions (Révisions) afin d'afficher la liste des révisions en cours pour ce service.
Sélectionnez la révision de service qui vous intéresse :
Examinez le panneau DETAILS (DÉTAILS) situé tout à droite pour obtenir des informations spécifiques à la révision, telles que l'URL de l'image de conteneur déployée, la quantité de mémoire allouée, les variables d'environnement, et éventuellement des informations sur la création et le dépôt source.
Ligne de commande
Pour afficher les détails d'une révision dans votre projet, procédez comme suit :
Recherchez le nom de votre service dans la liste des services disponibles dans votre projet :
gcloudrunserviceslist
Répertoriez toutes les révisions d'un service en spécifiant le nom de ce service dans la commande suivante :
gcloudrunrevisionslist--serviceSERVICE
Remplacez SERVICE par le nom du service.
Affichez les détails d'une révision en spécifiant le nom de ce service dans la commande suivante :
gcloudrunrevisionsdescribeREVISION
Remplacez REVISION par le nom de la révision sur laquelle vous souhaitez en savoir plus.
gcloudrunrevisionsdescribeREVISION--formatyaml
Sachez qu'une révision obsolète peut avoir le statut RETIRED, ce qui signifie que Knative serving a retiré l'infrastructure nécessaire à cette révision particulière.
À propos des informations sur la création et le dépôt source dans le panneau Details (Détails)
Si l'API Artifact Analysis est activée et que le conteneur a été créé avec Cloud Build, des informations sur la création sont affichées dans le panneau Details (Détails).
En outre, si un déclencheur Cloud Build a été utilisé pour créer le conteneur, des informations sur le dépôt source sont également affichées dans le panneau Details (Détails).
Supprimer des révisions
Pour s'assurer qu'une révision particulière ne sera pas utilisée accidentellement, une pratique courante consiste à la supprimer.
Vous ne pouvez pas supprimer une révision dans les cas suivants :
Elle peut recevoir du trafic.
Il s'agit de la seule révision du service.
Il s'agit de la dernière révision du service.
Lorsque vous supprimez une révision, l'image de conteneur utilisée par cette révision n'est pas automatiquement supprimée de Container Registry ou d'Artifact Registry. Pour supprimer une image de conteneur d'un registre, consultez les instructions de suppression pour Container Registry ou Artifact Registry.
Vous ne pouvez pas annuler la suppression d'une révision.
Vous pouvez utiliser la console ou la ligne de commande :
Console
Pour supprimer une révision, procédez comme suit :
Accédez à Knative serving dans la console Google Cloud :
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[],[],null,["# Managing revisions\n\nWhen you deploy to a service or change the configuration of a service, an\nimmutable revision is created.\n\nThe following considerations apply to revisions:\n\n- You can specify whether a new revision receives all, none, or some of the\n traffic, you can gradually roll out a new revision, you can split traffic\n between several revisions, and you can roll back from a revision. For more\n information, refer to\n [Rollbacks, gradual rollouts, and traffic migration](/kubernetes-engine/enterprise/knative-serving/docs/rollouts-rollbacks-traffic-migration).\n\n- You can optionally use [revision tags](/kubernetes-engine/enterprise/knative-serving/docs/rollouts-rollbacks-traffic-migration#tags)\n to test a revision that is not serving traffic.\n\n- You don't need to [manually delete revisions](#delete), although you can if you want.\n\n- Non-serving revisions do not consume any resources and are not billed.\n\n- There is a maximum of 1000 revisions per service: If you exceed that limit, older revisions are automatically deleted.\n\n- The revision suffix is assigned automatically. If you want to use your own\n version suffix, you can do so using the Google Cloud CLI parameter\n [--revision-suffix](/sdk/gcloud/reference/run/deploy#--revision-suffix).\n\nViewing the list of revisions for a service\n-------------------------------------------\n\n### Console\n\nTo view the list of revisions in your project:\n\n1. Go to Knative serving in the Google Cloud console:\n\n [Go to Knative serving](https://console.cloud.google.com/kubernetes/run)\n2. Locate the service in the services list, and click\n on it.\n\n3. Click the *Revisions* tab to show the list of current revisions for that\n service.\n\n### Command line\n\n\nTo view the list of revisions for a given service:\n\n1. Find your service name from the list of services available in your\n project:\n\n ```bash\n gcloud run services list\n ```\n2. List all the revisions for a service by specifying the name of that\n service in the following command:\n\n \u003cbr /\u003e\n\n ```bash\n gcloud run revisions list --service SERVICE\n ```\n\n \u003cbr /\u003e\n\n Replace \u003cvar translate=\"no\"\u003eSERVICE\u003c/var\u003e with the name of your service.\n\nViewing revision details\n------------------------\n\n### Console\n\nTo view the details of a revision in your project:\n\n1. Go to Knative serving in the Google Cloud console:\n\n [Go to Knative serving](https://console.cloud.google.com/kubernetes/run)\n2. Locate the service in the services list, and click\n on it.\n\n3. Click the *Revisions* tab to show the list of current revisions for that\n service.\n\n4. Select the service revision you are interested in:\n\n5. Examine the *DETAILS* panel at the far right for revision-specific\n information such as the URL of the deployed container image, amount of\n memory allocated, environment variables, and possibly\n [build and source repository information](#build-source).\n\n### Command line\n\nTo view the details of a revision in your project:\n\n1. Find your service name from the list of services available in your\n project:\n\n \u003cbr /\u003e\n\n ```bash\n gcloud run services list\n ```\n\n \u003cbr /\u003e\n\n2. List all the revisions for a service by specifying the name of that\n service in the following command:\n\n \u003cbr /\u003e\n\n ```bash\n gcloud run revisions list --service SERVICE\n ```\n\n \u003cbr /\u003e\n\n Replace \u003cvar translate=\"no\"\u003eSERVICE\u003c/var\u003e with the name of your service.\n3. Display details of a revision by specifying the name of that revision\n in the following command:\n\n \u003cbr /\u003e\n\n ```bash\n gcloud run revisions describe REVISION\n ```\n\n \u003cbr /\u003e\n\n Replace \u003cvar translate=\"no\"\u003eREVISION\u003c/var\u003e with the name of the revision you want to\n learn more about.\n | **Tip:** You can use the [`--format` flag](/sdk/gcloud/reference#--format) to format the output. For example as YAML:\n\n \u003cbr /\u003e\n\n ```bash\n gcloud run revisions describe REVISION --format yaml\n ```\n\n \u003cbr /\u003e\n\nNote that a non-current revision may have the status of `RETIRED`, which means\nthat Knative serving has retired the infrastructure needed for that\nparticular revision.\n\n### About build and source repository information in the *Details* panel\n\nIf the\n[Artifact Analysis API](/container-registry/docs/container-analysis)\nis enabled and the container was built with [Cloud Build](/build),\nbuild information is displayed in the *Details* panel.\n\nAdditionally, if a\n[Cloud Build trigger](/build/docs/running-builds/create-manage-triggers)\nwas used to build the container, source repository information is also displayed\nin the *Details* panel.\n\nDeleting revisions\n------------------\n\nA common use case for deleting a revision is when you want to make sure a\nparticular revision won't be accidentally used.\n\nYou cannot delete a revision if:\n\n- it is able to receive traffic,\n- it is the only revision of the service,\n- it is the latest revision of the service.\n\nWhen you delete a revision, the container image used by this revision is not\ndeleted automatically from Container Registry or Artifact Registry. To delete a\ncontainer image from a registry, see the deletion instructions for\n[Container Registry](/container-registry/docs/managing#deleting_images) or\n[Artifact Registry](/artifact-registry/docs/docker/manage-images#deleting_images).\n\nYou cannot undo a revision deletion.\n\nYou can use either the console or the command line: \n\n### Console\n\nTo delete a revision:\n\n1. Go to Knative serving in the Google Cloud console:\n\n [Go to Knative serving](https://console.cloud.google.com/kubernetes/run)\n2. Locate the service in the services list, and click\n on it.\n\n3. Click the *Revisions* tab to show the list of current revisions for that\n service.\n\n4. Locate the service revision you want to delete.\n\n5. Click the three-dot vertical ellipse to the left of the revision to show\n the *Delete* menu.\n\n6. Click **Delete** to delete the revision.\n\n### Command line\n\nTo delete a revision, use the following command:\n\n\u003cbr /\u003e\n\n```bash\ngcloud run revisions delete REVISION\n```\n\n\u003cbr /\u003e\n\nReplace \u003cvar translate=\"no\"\u003eREVISION\u003c/var\u003e with the name of the revision you want to delete.\n\nWhat's next\n-----------\n\nAfter you deploy a revision, you can do the following:\n\n- [Gradual rollouts, rollback revisions, traffic migration](/kubernetes-engine/enterprise/knative-serving/docs/rollouts-rollbacks-traffic-migration)"]]