For previous "free-trial" installations of Knative serving, you must first upgrade Knative serving to use GKE Enterprise fleets .
Use this page to install the default components of Knative serving on your GKE clusters in Google Cloud with the following configuration:
-
Knative serving on Google Cloud is configured for public clusters by default.
-
Cloud Monitoring metrics for GKE Enterprise on Google Cloud clusters are enabled by default.
Before you begin
-
To install Knative serving in private clusters on Google Cloud, you must perform a custom installation .
-
You must ensure that you meet the installation prerequisites .
-
If Knative serving is installed in your cluster, you must ensure that the " GKE add-on " does not exist before you perform these fleet component installation steps. If you have the " add-on " installed, you must instead follow the steps for upgrading to GKE Enterprise fleets .
Check if the " GKE add-on " is installed.
To check if your installation of Knative serving is the " GKE add-on ", run the following command:
gcloud container clusters describe \ CLUSTER_NAME \ --region CLUSTER_LOCATION \ --project PROJECT_ID --format = 'get(addonsConfig.cloudRunConfig)'
Replace:
- CLUSTER_NAME with the name of your cluster.
- CLUSTER_LOCATION with the location where your cluster is located.
- PROJECT_ID with the ID of your Google Cloud project.
Results:
- " GKE add-on
" not installed
:
- Nothing is returned to your terminal if the add-on was never installed.
-
disabled=trueis returned if the add-on was previously uninstalled.
- " GKE add-on
" is installed
: If the add-on is installed in your
cluster, the configuration details for the add-on are returned.
Example:
loadBalancerType=LOAD_BALANCER_TYPE_EXTERNAL
- Example:
- The following example demonstrates that Knative serving was installed in the
my-addon-clustercluster through the " GKE add-on ", which is configured to handle external traffic:gcloud container clusters describe my-addon-cluster \ --region us-central1-c --project my-gcp-project \ --format = 'get(addonsConfig.cloudRunConfig)'
Response:
loadBalancerType = LOAD_BALANCER_TYPE_EXTERNAL
Installing Knative serving
To install the default components of Knative serving:
-
Enable Knative serving in your fleet:
gcloud container fleet cloudrun enable --project= PROJECT_IDReplace PROJECT_ID with the ID of your Google Cloud project.
For details and additional options, see the gcloud container fleet cloudrun enable reference.
-
Optional: Verify that the Knative serving feature component is enabled:
Console
View if the Knative serving component is Enabledin the Google Cloud console:
Command line
View if the
appdevexperiencestate isACTIVE:gcloud container fleet features list --project= PROJECT_IDReplace PROJECT_ID with the ID of your Google Cloud project.
For details and additional options, see the gcloud container fleet features list reference.
Result:
NAME STATE appdevexperience ACTIVE -
For each GKE Enterprise cluster where you want to install Knative serving, run the corresponding command:
gcloud container fleet cloudrun apply --gke-cluster = CLUSTER_LOCATION / CLUSTER_NAMEReplace the following:
- CLUSTER_LOCATION with the region or zone in which your cluster is located.
- CLUSTER_NAME with the ID of your cluster or the fully qualified identifier for the cluster.
For details and additional options, see the gcloud container fleet cloudrun apply reference.
- Verify that Knative serving has been enabled in your cluster:
- Open the Google Cloud console:
- Click on the name of your cluster to open the details pane.
- Run this command to check if you can see the Knative serving version details:
kubectl get all -n knative-serving -o 'go-template={{index .metadata.labels "serving.knative.dev/release"}}' - Verify that all Knative serving specific deployments are in running status under
knative-servingandappdevexperiencenamespaces.

