Désinstaller le module complémentaire GKE de Knative serving
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Désinstallez le module complémentaire GKE de Knative serving depuis votre cluster, y compris les ressources et les libellés associés.
Dans cette tâche, le script de migration permet de ne supprimer que le module complémentaire GKE de votre cluster. L'ensemble de vos ressources Knative serving existantes sont conservées dans votre cluster et continuent à diffuser le trafic.
Il est important d'effectuer chaque étape de ce processus dans l'ordre spécifié.
Présentation
La désinstallation du module complémentaire GKE inclut les étapes suivantes :
La vérification que le pool de nœuds répond aux exigences de mise à niveau
L'application des libellés de migration et la création du webhook d'admission ValidatingWebhookConfiguration pour empêcher la suppression de vos ressources Knative serving dans les espaces de noms suivants :
knative-serving
cloud-run-system
gke-system
La désinstallation du module complémentaire GKE, y compris la suppression des libellés du gestionnaire associés de vos ressources Knative serving.
Notez que ce processus peut prendre plus de 10 minutes.
L'ajout d'annotations appdevexperience-operator
La suppression de la ressource cloudrun.operator.run.cloud.google.com obsolète qui n'est pas utilisée avec les parcs.
Désinstaller le module complémentaire GKE de Knative serving
Dans cette section, le script de migration permet de désinstaller le module complémentaire GKE.
Exécutez la commande suivante pour démarrer le script de migration :
Dans le terminal, le script de migration vous invite à confirmer chaque opération. Saisissez y pour commencer le processus et continuer à chaque invite.
Les invites lors du processus de désinstallation du module complémentaire GKE se présentent comme suit :
In this process, the script performs the following:
1. Validating the node pool to make sure it meets the requirements for
upgrading. Confirming node pool requirements for
my-gcp-project/us-central1-c/my-gke-cluster...
2. Applying the required migration labels
namespace/knative-serving labeled
3. Create a ValidatingWebhookConfiguration admission webhook to prevent
the deletion of resources under the following namespaces:
knative-serving, cloud-run-system, and gke-system
Continue? [Y/n] y
validatingwebhookconfiguration.admissionregistration.k8s.io/prevent-deletion-cloud-run-resources created
ValidatingWebhookConfiguration prevent-deletion-cloud-run-resources for preventing deleting Knative serving resources is effective.
4. Uninstall the Knative serving GKE add-on? Your
Knative serving resources remain in your cluster.
Continue? [Y/n] y
Updating my-gke-cluster...
5. Removing the add-on manager labels and adding the Operator related
annotations. This step will take about 10 minutes.
customresourcedefinition.apiextensions.k8s.io/certificates.networking.internal.knative.dev annotated
6. Clean up unused stale Knative serving operator.
cloudrun.operator.run.cloud.google.com "cloud-run" deleted
No resources found
Knative serving GKE add-on is successfully uninstalled.
Vérifiez que le module complémentaire GKE a été défini sur disabled en exécutant la commande suivante :
Si vous devez effectuer un rollback des modifications que vous avez apportées en suivant les étapes ci-dessus, vous pouvez utiliser le script de migration pour :
Réactiver le "module complémentaire GKE" de Knative serving.
Supprimer le webhook d'admission ValidatingWebhookConfiguration.
Pour lancer le processus de rollback, procédez comme suit :
Exécutez la commande suivante pour démarrer le script de migration :
Dans le terminal, le script de migration vous invite à confirmer chaque opération. Saisissez y à chaque invite pour continuer.
Les invites lors du processus de réactivation du module complémentaire GKE se présentent comme suit :
In this step, the script performs the following:
1. Enable Knative serving GKE add-on
2. Remove the ValidatingWebhookConfiguration added for uninstalling addon
Continue? [Y/n] Y
1. Enable Knative serving GKE add-on?
Continue? [Y/n] Y
Updating my-gke-cluster...done.
Knative serving GKE add-on is enabled
2. Remove the ValidatingWebhookConfiguration added for uninstalling addon?
Continue? [Y/n] Y
Removing the ValidatingWebhookConfiguration used to prevent deletion
Vérifiez que le module complémentaire GKE de Knative serving est réactivé :
Si le module complémentaire est en cours d'exécution dans votre cluster, les détails de configuration du module complémentaire sont renvoyés. Exemple :
loadBalancerType=LOAD_BALANCER_TYPE_EXTERNAL
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/03 (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/03 (UTC)."],[],[],null,["# Uninstall the Knative serving GKE add-on\n\nUninstall the Knative serving \"*GKE add-on*\" from your cluster,\nincluding related resources and labels.\n\nIn this task, the [migration script](/kubernetes-engine/enterprise/knative-serving/docs/install/on-gcp/upgrade/prepare) is used to\nremove only the \"*GKE add-on*\" from your\ncluster, all of your existing Knative serving resources remain in your cluster\nand continue serving traffic.\n\nBefore you begin\n----------------\n\n- You must first review and ensure that you meet the\n [requirements for upgrading](/kubernetes-engine/enterprise/knative-serving/docs/install/on-gcp/upgrade).\n\n- The commands on this page use the environment variables and migration script\n from the [upgrade preparation step](/kubernetes-engine/enterprise/knative-serving/docs/install/on-gcp/upgrade/prepare).\n\n- It is important that you perform each step of this process in the\n [specified order](/kubernetes-engine/enterprise/knative-serving/docs/install/on-gcp/upgrade#upgrading).\n\nOverview\n--------\n\nUninstalling the *GKE add-on* includes:\n\n1. Validating that the node pool meets the requirements for upgrading.\n2. Applying migration labels and creating the admission webhook `ValidatingWebhookConfiguration` to prevent your Knative serving resources from being deleted in the following namespaces:\n - `knative-serving`\n - `cloud-run-system`\n - `gke-system`\n3. Uninstalling the \"*GKE add-on*\", including removing the\n related manager labels from your Knative serving resources.\n\n Note that this process can run for more than 10 minutes.\n4. Adding the `appdevexperience-operator` annotations.\n\n5. Removing the stale `cloudrun.operator.run.cloud.google.com`\n resource that is not used with fleets.\n\n| **Note:** While the traffic to your services remain unaffected, the GKE control plane (\"*master*\") node is updated and therefore, becomes temporarily unavailable during the process. Any operations that require access to the GKE control plane such as Kubernetes resource operations like delete, update, or create will not occur until the update completes.\n\nUninstall the Knative serving GKE add-on\n----------------------------------------\n\nIn this section, the [migration script](/kubernetes-engine/enterprise/knative-serving/docs/install/on-gcp/upgrade/prepare) is used to\nuninstall the \"*GKE add-on*\".\n\n1. Run the following command to start the migration script:\n\n ./migration-addon.sh --command uninstall-cloudrun-addon\n\n2. In the terminal, the migration script prompts you for your confirmation to\n perform each action. Enter `y` to begin the process and also to continue at\n each prompt.\n\n The prompts during the process of uninstalling the\n \"*GKE add-on*\" look similar to the following: \n\n In this process, the script performs the following:\n 1. Validating the node pool to make sure it meets the requirements for\n upgrading. Confirming node pool requirements for\n my-gcp-project/us-central1-c/my-gke-cluster...\n 2. Applying the required migration labels\n namespace/knative-serving labeled\n 3. Create a ValidatingWebhookConfiguration admission webhook to prevent\n the deletion of resources under the following namespaces:\n knative-serving, cloud-run-system, and gke-system\n Continue? [Y/n] y\n\n validatingwebhookconfiguration.admissionregistration.k8s.io/prevent-deletion-cloud-run-resources created\n ValidatingWebhookConfiguration prevent-deletion-cloud-run-resources for preventing deleting Knative serving resources is effective.\n\n 4. Uninstall the Knative serving GKE add-on? Your\n Knative serving resources remain in your cluster.\n Continue? [Y/n] y\n\n Updating my-gke-cluster...\n\n 5. Removing the add-on manager labels and adding the Operator related\n annotations. This step will take about 10 minutes.\n\n customresourcedefinition.apiextensions.k8s.io/certificates.networking.internal.knative.dev annotated\n\n 6. Clean up unused stale Knative serving operator.\n\n cloudrun.operator.run.cloud.google.com \"cloud-run\" deleted\n No resources found\n\n Knative serving GKE add-on is successfully uninstalled.\n\n3. Verify that the \"*GKE add-on* \" was `disabled` by running\n the following command:\n\n gcloud container clusters describe ${CLUSTER_NAME} --region ${CLUSTER_LOCATION} --project ${PROJECT_ID} --format='get(addonsConfig.cloudRunConfig.disabled)'\n\n `True` is returned if the \"*GKE add-on*\" was successfully\n removed from your cluster.\n\nWhat's next\n-----------\n\n[Migrate to Cloud Service Mesh](/kubernetes-engine/enterprise/knative-serving/docs/install/on-gcp/upgrade/migrate-service-mesh)\n\nRollback\n--------\n\nIf you need to rollback the changes that you made through the steps above, you\ncan use the migration script to:\n\n- Re-enable the Knative serving \"GKE add-on\".\n- Remove the `ValidatingWebhookConfiguration` admission webhook.\n\nTo begin the rollback process:\n\n1. Run the following command to start the migration script:\n\n ./migration-addon.sh --command rollback-uninstall-cloudrun-addon\n\n2. In the terminal, the migration script prompts you for your confirmation to\n perform each action. Enter `y` to at each prompt to proceed.\n\n The prompts during the process of re-enabling the\n \"*GKE add-on*\" look similar to the following: \n\n In this step, the script performs the following:\n 1. Enable Knative serving GKE add-on\n 2. Remove the ValidatingWebhookConfiguration added for uninstalling addon\n Continue? [Y/n] Y\n\n 1. Enable Knative serving GKE add-on?\n Continue? [Y/n] Y\n\n Updating my-gke-cluster...done.\n Knative serving GKE add-on is enabled\n\n 2. Remove the ValidatingWebhookConfiguration added for uninstalling addon?\n Continue? [Y/n] Y\n\n Removing the ValidatingWebhookConfiguration used to prevent deletion\n\n3. Verify the Knative serving \"*GKE add-on*\" is re-enabled:\n\n gcloud container clusters describe ${CLUSTER_NAME} --region ${CLUSTER_LOCATION} --project ${PROJECT_ID} --format='get(addonsConfig.cloudRunConfig)'\n\n If the add-on is running in your cluster, the configuration details for the\n add-on are returned. Example: \n\n loadBalancerType=LOAD_BALANCER_TYPE_EXTERNAL"]]