Before you can deploy and manage serverless workloads with Knative serving on your Kubernetes clusters outside Google Cloud, you need to ensure your environment meets essential prerequisites, such as registering your clusters to a fleet and installing Cloud Service Mesh. Knative serving helps simplify the development and deployment of event-driven, container-based applications. It helps you host these applications on your own infrastructure, providing benefits such as portability across environments and efficient autoscaling based on demand. Configuring your environment correctly, including setting appropriate permissions and enabling required APIs, streamlines the installation process and helps you fully use Knative serving's features. Review these critical requirements before you proceed with the installation.

- Review and understand the
  [access permissions of components in Knative serving](https://docs.cloud.google.com/kubernetes-engine/enterprise/knative-serving/docs/install/permissions.md.txt).

- You must ensure that you have adequate permissions in your Google Cloud project
  to meet the installation requirements for your cluster,
  fleet, and Cloud Service Mesh:

  - If you have the [*Owner*](https://docs.cloud.google.com/iam/docs/roles-overview.md.txt#basic) role for the Google Cloud project, then you have more than the necessary permissions to create clusters, install, and then configure Knative serving.
  - Your GKE clusters outside of Google Cloud might also require other permissions. [See the documentation and requirements for your cluster](https://docs.cloud.google.com/anthos/clusters/docs).
  - Note that the
    [Cloud Service Mesh permissions requirements](https://docs.cloud.google.com/service-mesh/docs/onboarding/provision-control-plane.md.txt#roles-required)
    also meet all the permission requirements for installing and configuring
    Knative serving.

  - Using other roles and the minimum requirements:

    Depending on your organization, you can also meet the permission
    requirements through a combination of the following predefined roles:
    - Google Cloud project permissions: [Basic *Editor* role](https://docs.cloud.google.com/iam/docs/roles-overview.md.txt#basic)

    - Fleet permissions:
      [*GKE Hub Admin*](https://docs.cloud.google.com/iam/docs/roles-permissions/gkehub.md.txt)
      or a role that includes the following permissions:

      - `gkehub.features.create`
      - `gkehub.features.update`
    - Cluster permissions:
      [A Kubernetes Engine Admin Role](https://docs.cloud.google.com/iam/docs/roles-permissions/container.md.txt):

      - *Kubernetes Engine Admin*
      - *Kubernetes Engine Cluster Admin*
- A cluster with the following configuration is required:

  - A supported

    [Google Distributed Cloud cluster](https://docs.cloud.google.com/anthos/clusters/docs/on-prem).
    For previous installations on Google Distributed Cloud clusters, you must
    [migrate Knative serving on VMware to a fleet](https://docs.cloud.google.com/kubernetes-engine/enterprise/knative-serving/docs/install/outside-gcp/upgrade-vmware.md.txt).

    **[Preview](https://cloud.google.com/products#product-launch-stages)** : Other GKE clusters
    environments outside Google Cloud are currently available as a "*Preview* ".
    [Learn more](https://docs.cloud.google.com/kubernetes-engine/enterprise/knative-serving/docs/install/outside-gcp.md.txt).
  - Registered to a fleet:

    [Go to GKE clusters](https://console.cloud.google.com/kubernetes/list/overview)

    > [!TIP]
    > **Tip:** Workload Identity Federation for GKE allows you to authenticate to Google Cloud services and it's also required by Cloud Service Mesh. Enabling fleet Workload Identity Federation in your cluster during fleet registration can reduce the configuration and deployment time.

    To learn how to register your cluster and enable Workload Identity Federation for GKE in
    your fleet, see
    [Registering a cluster](https://docs.cloud.google.com/kubernetes-engine/fleet-management/docs/register/gke.md.txt). Supported cluster types outside Google Cloud are registered by default.
  - In-cluster [Cloud Service Mesh is installed](https://docs.cloud.google.com/service-mesh/docs/onboarding/kubernetes-off-gcp/install/install-in-cluster-cloud-service-mesh.md.txt).
    Additionally, note the following prerequisites:

    - The [Google-managed Cloud Service Mesh control plane](https://docs.cloud.google.com/service-mesh/docs/supported-features-mcp) is currently not fully supported by Knative serving. Use the in-cluster control plane instead.
    - Cloud Service Mesh requires that your cluster use a machine type with at least 4 vCPUs, such as `e2-standard-4`. See the Cloud Service Mesh installation guide for details about requirements. If you need to change your existing cluster's machine type, see [Migrating workloads to different machine types](https://docs.cloud.google.com/kubernetes-engine/docs/tutorials/migrating-node-pool).
    - In order to benefit from the automated provisioning of test domains - Cloud Service Mesh uses an ingress gateway and a service named `istio-ingress` in namespace `istio-system`. To enable creation of the gateway during the feature installation use `--option legacy-default-ingressgateway` of `asmcli` installation script.
- [The command-line environment must be set up](https://docs.cloud.google.com/kubernetes-engine/enterprise/knative-serving/docs/install/outside-gcp/command-line-tools.md.txt).

- The following APIs must be enabled in your Google Cloud project:

  - Kubernetes Engine API: Build and manage container-based applications.
  - Cloud Build API: Create and manage builds.
  - Container Registry API: Push and pull images in Container Registry.

  [Enable the APIs in the Google Cloud console](https://console.cloud.google.com/start/api?id=container.googleapis.com,containerregistry.googleapis.com,cloudbuild.googleapis.com)