The commands on this page use the environment variables and migration script
from the upgrade preparation step.
It is important that you perform each step of this process in the
specified order.
Overview
Installing Knative serving as a fleet component includes:
Enabling fleets in your Google Cloud project.
Copying the gke-system-gateway Gateway over to the
knative-ingress-gateway Gateway.
Installing the Knative serving custom resource in your cluster.
Note that during this process, your existing Knative serving services continue
to service traffic uninterrupted.
Install the Knative serving fleet component
In this section, the migration script is used to
install Knative serving as a fleet component.
Run the following command to start the migration script:
./migration-addon.sh--commandinstall-cloud-run-v2
Note that if you have any issues with this step or want to change something,
you can re-run this migration script command.
In the terminal, the migration script prompts you for your confirmation to
perform each action. Enter y at each prompt to proceed.
The prompts during the process of installing the Knative serving
fleet component look similar to the following:
In the process of installing the Knative serving fleet component, the
script performs the following:
1. Enabling the fleet in your Google Cloud project.
2. Copy gke-system-gateway Gateway to knative-ingress-gateway Gateway
3. Installing the Knative serving custom resource in your cluster.
Continue? [Y/n] y
1. Enabling Anthos services?
Continue? [Y/n] y
Operation "operations/acf.p2-625914735451-10d4b6ff-68e1-4a09-97c4-79b209be5031" finished successfully.
2. Copying gke-system-gateway Gateway to knative-ingress-gateway Gateway
configmap/original-knative-ingress-gateway-spec unchanged
gateway.networking.istio.io/knative-ingress-gateway patched (no
change)
configmap/config-istio patched
configmap/config-istio patched
gateway.networking.istio.io "gke-system-gateway" deleted
3. Install the Knative serving custom resource in your cluster?
Continue? [Y/n] y
Waiting for Knative serving feature to be enabled
Knative serving feature is enabled.
The YAML file for the new operator appdevexperience-operator was created at
/tmp/tmp.bI7H1qagGa/cloudrun.yaml
customresourcedefinition.apiextensions.k8s.io/cloudruns.operator.run.cloud.google.com
condition met
kubeconfig entry generated for my-gke-cluster.
Added the custom resource for Knative serving
Waiting for Knative serving serving to be ready...
Knative serving serving is not ready yet.
Knative serving serving is ready.
Removing the ValidatingWebhookConfiguration used to prevent deletion
validatingwebhookconfiguration.admissionregistration.k8s.io
"prevent-deletion-cloud-run-resources" deleted
Knative serving has been installed as an Anthos fleet component
Known issue for private clusters
If your installation of Knative serving is on a
private cluster
on Google Cloud, you might receive a timeout error from:
In the terminal, the migration script prompts you for your confirmation to
perform each action. Enter y to at each prompt to proceed.
The prompts during the process of uninstalling the fleet
component look similar to the following:
In the step of rolling back the Knative serving fleet installation, the
script performs the following:
1. Remove control of Knative serving resources from the operator
`appdevexperience-operator`.
2. Delete the Knative serving custom resource and uninstall the operator
`appdevexperience-operator`.
3. Revert the changes installed by the Knative serving fleet component.
4. Optional: Disable Knative serving in the GKE Enterprise fleet of your
Google Cloud project.
Continue? [Y/n] y
1. Removing control of Knative serving resources from the operator
`appdevexperience-operator`.
Creating a ValidatingWebhookConfiguration to prevent the deletion of the
resources under the following namespaces:
knative-serving, cloud-run-system, and gke-system
waiting for OwnerReferences of Knative serving resources to be deleted
OwnerReferences of Knative serving resources are deleted
Waiting for Knative serving serving to be ready...
Knative serving serving is ready.
2. Delete the Knative serving custom resource and uninstall the operator
`appdevexperience-operator`?
Continue? [Y/n] y
cloudrun.operator.run.cloud.google.com "cloud-run" deleted
clusteractiveoperand.operand.run.cloud.google.com/sha256-3c1c80a329 patched
waiting for appdevexperience namespace to be deleted
3. Revert the changes installed by the fleet component?
configmap/config-observability patched
4. Optional: Disable Knative serving in the Anthos fleet of your
Google Cloud project?
You can choose to skip this step and keep the feature enable within your
Anthos fleet. For example, you might want to keep the
Knative serving fleet component enabled because it was enabled prior to
this migration.
Continue (or Skip)? [Y/n] n
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Install the Knative serving fleet component\n\nInstall Knative serving as a GKE Enterprise fleet component.\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\nInstalling Knative serving as a fleet component includes:\n\n1. Enabling fleets in your Google Cloud project.\n2. Copying the `gke-system-gateway` Gateway over to the `knative-ingress-gateway` Gateway.\n3. Installing the Knative serving custom resource in your cluster.\n\nNote that during this process, your existing Knative serving services continue\nto service traffic uninterrupted.\n\nInstall the Knative serving fleet component\n-------------------------------------------\n\nIn this section, the [migration script](/kubernetes-engine/enterprise/knative-serving/docs/install/on-gcp/upgrade/prepare) is used to\ninstall Knative serving as a fleet component.\n\n1. Run the following command to start the migration script:\n\n ./migration-addon.sh --command install-cloud-run-v2\n\n Note that if you have any issues with this step or want to change something,\n you can re-run this migration script command.\n2. In the terminal, the migration script prompts you for your confirmation to\n perform each action. Enter `y` at each prompt to proceed.\n\n The prompts during the process of installing the Knative serving\n fleet component look similar to the following: \n\n In the process of installing the Knative serving fleet component, the\n script performs the following:\n 1. Enabling the fleet in your Google Cloud project.\n 2. Copy gke-system-gateway Gateway to knative-ingress-gateway Gateway\n 3. Installing the Knative serving custom resource in your cluster.\n Continue? [Y/n] y\n\n 1. Enabling Anthos services?\n Continue? [Y/n] y\n\n Operation \"operations/acf.p2-625914735451-10d4b6ff-68e1-4a09-97c4-79b209be5031\" finished successfully.\n\n 2. Copying gke-system-gateway Gateway to knative-ingress-gateway Gateway\n\n configmap/original-knative-ingress-gateway-spec unchanged\n gateway.networking.istio.io/knative-ingress-gateway patched (no\n change)\n configmap/config-istio patched\n configmap/config-istio patched\n gateway.networking.istio.io \"gke-system-gateway\" deleted\n\n 3. Install the Knative serving custom resource in your cluster?\n Continue? [Y/n] y\n\n Waiting for Knative serving feature to be enabled\n Knative serving feature is enabled.\n The YAML file for the new operator appdevexperience-operator was created at\n /tmp/tmp.bI7H1qagGa/cloudrun.yaml\n customresourcedefinition.apiextensions.k8s.io/cloudruns.operator.run.cloud.google.com\n condition met\n kubeconfig entry generated for my-gke-cluster.\n Added the custom resource for Knative serving\n\n Waiting for Knative serving serving to be ready...\n Knative serving serving is not ready yet.\n Knative serving serving is ready.\n\n Removing the ValidatingWebhookConfiguration used to prevent deletion\n validatingwebhookconfiguration.admissionregistration.k8s.io\n \"prevent-deletion-cloud-run-resources\" deleted\n\n Knative serving has been installed as an Anthos fleet component\n\n **Known issue for private clusters**\n\n If your installation of Knative serving is on a\n [private cluster](/kubernetes-engine/docs/concepts/private-cluster-concept)\n on Google Cloud, you might receive a timeout error from: \n\n Waiting for CRD cloudruns.operator.run.cloud.google.com to be created\n\n To work around the timeout error, run the following command: \n\n cat \u003c\u003cEOF | kubectl apply -f -\n apiVersion: operator.run.cloud.google.com/v1alpha1\n kind: CloudRun\n metadata:\n name: cloud-run\n EOF\n\n3. Verify that the Knative serving feature component is\n enabled:\n\n ### Console\n\n View if the Knative serving component is **Enabled** in the\n Google Cloud console:\n\n [Go to Feature Manager](https://console.cloud.google.com/kubernetes/features)\n\n ### Command line\n\n View if the `appdevexperience` state is `ACTIVE`: \n\n gcloud alpha container hub features list --project=\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with the ID of your Google Cloud project.\n\n For details and additional options, see the\n [gcloud alpha container hub features list](/sdk/gcloud/reference/alpha/container/hub/features/list)\n reference.\n\nWhat's next\n-----------\n\nNow that Cloud Service Mesh and Knative serving are installed, you can begin to\n[migrate and roll-out traffic to your new resources](/kubernetes-engine/enterprise/knative-serving/docs/install/on-gcp/upgrade/migrate-traffic).\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- Remove control of your Knative serving resources from the operator `appdevexperience-operator`.\n- Delete the Knative serving custom resource and uninstall the operator `appdevexperience-operator`.\n- Optional: Disable Knative serving in the fleet of your Google Cloud project.\n\nTo begin the rollback process:\n\n1. Run the following command to start the migration script:\n\n ./migration-addon.sh --command rollback-install-cloud-run-v2\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 uninstalling the fleet\n component look similar to the following: \n\n In the step of rolling back the Knative serving fleet installation, the\n script performs the following:\n 1. Remove control of Knative serving resources from the operator\n `appdevexperience-operator`.\n 2. Delete the Knative serving custom resource and uninstall the operator\n `appdevexperience-operator`.\n 3. Revert the changes installed by the Knative serving fleet component.\n 4. Optional: Disable Knative serving in the GKE Enterprise fleet of your\n Google Cloud project.\n Continue? [Y/n] y\n\n 1. Removing control of Knative serving resources from the operator\n `appdevexperience-operator`.\n\n Creating a ValidatingWebhookConfiguration to prevent the deletion of the\n resources under the following namespaces:\n knative-serving, cloud-run-system, and gke-system\n\n waiting for OwnerReferences of Knative serving resources to be deleted\n\n OwnerReferences of Knative serving resources are deleted\n\n Waiting for Knative serving serving to be ready...\n Knative serving serving is ready.\n\n 2. Delete the Knative serving custom resource and uninstall the operator\n `appdevexperience-operator`?\n Continue? [Y/n] y\n\n cloudrun.operator.run.cloud.google.com \"cloud-run\" deleted\n clusteractiveoperand.operand.run.cloud.google.com/sha256-3c1c80a329 patched\n\n waiting for appdevexperience namespace to be deleted\n\n 3. Revert the changes installed by the fleet component?\n configmap/config-observability patched\n\n 4. Optional: Disable Knative serving in the Anthos fleet of your\n Google Cloud project?\n You can choose to skip this step and keep the feature enable within your\n Anthos fleet. For example, you might want to keep the\n Knative serving fleet component enabled because it was enabled prior to\n this migration.\n Continue (or Skip)? [Y/n] n"]]