Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
So installieren Sie Knative Serving in Ihren GKE-Clustern in Google Cloud.
Knative Serving verwendet jetzt Cloud Service Mesh- und GKE Enterprise-Flotten. Das ist neu bei Knative Serving-FlotteniInstallationen.
Warnung: Wenn Sie die Schritte auf dieser Seite ausführen, wird eine neue Installation von Knative Serving ausgeführt und die vorherige Installation ohne Flotte wird überschrieben.
Fahren Sie nicht mit den folgenden Schritten in Ihren Clustern fort, für die Sie zuvor Knative Serving aktiviert haben.
Auf dieser Seite werden die Standardkomponenten von Knative Serving auf Ihren GKE-Clustern in Google Cloud mit der folgenden Konfiguration installiert:
Knative Serving in Google Cloud ist standardmäßig für öffentliche Cluster konfiguriert.
Cloud Monitoring-Messwerte für GKE Enterprise in Google Cloud-Clustern sind standardmäßig aktiviert.
Hinweise
Um Knative Serving in privaten Clustern in Google Cloud zu installieren, müssen Sie eine benutzerdefinierte Installation durchführen.
Wenn Knative Serving in Ihrem Cluster installiert ist, müssen Sie dafür sorgen, dass das GKE-Add-on nicht vorhanden ist, bevor Sie diese Schritte zur Installation der Flottenkomponenten ausführen. Wenn das Add-on installiert ist, müssen Sie stattdessen die Schritte zum Upgrade auf GKE Enterprise-Flotten ausführen.
Prüfen, ob das GKE-Add-on installiert ist
Mit dem folgenden Befehl können Sie prüfen, ob Ihre Installation von Knative Serving das GKE-Add-on ist:
CLUSTER_LOCATION durch die Standort, an dem sich der Cluster befindet.
Ersetzen Sie PROJECT_ID durch die ID Ihres Google Cloud-Projekts.
Das Ergebnis:
GKE-Add-on ist nicht installiert:
Wenn das Add-on nie installiert war, wird nichts an Ihr Terminal zurückgegeben.
disabled=true wird zurückgegeben, wenn das Add-on zuvor deinstalliert wurde.
GKE-Add-on ist installiert: Wenn das Add-on in Ihrem Cluster installiert ist, werden die Konfigurationsdetails für das Add-on zurückgegeben.
Beispiel: loadBalancerType=LOAD_BALANCER_TYPE_EXTERNAL
Beispiel:
Im folgenden Beispiel wird gezeigt, dass Knative Serving im Cluster my-addon-cluster über das GKE-Add-on installiert wurde, das für die Verarbeitung externen Traffics konfiguriert ist:
Klicken Sie auf den Namen Ihres Clusters, um den Detailbereich zu öffnen.
Führen Sie diesen Befehl aus, um zu prüfen, ob Sie die Details zur Version von Knative Serving sehen: kubectl get namespace knative-serving -o 'go-template={{index .metadata.labels "serving.knative.dev/release"}}'
Prüfen Sie, ob alle Knative Serving-spezifischen Bereitstellungen für die Bereitstellung unter den Namespaces knative-serving und appdevexperience ausgeführt werden.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2024-11-22 (UTC)."],[],[],null,["# Installing Knative serving on Google Cloud\n\nLearn how to install Knative serving in your GKE clusters on Google Cloud. Knative serving now uses Cloud Service Mesh and GKE Enterprise fleets. [Learn what's new and changed with Knative serving\nfleet installations](/kubernetes-engine/enterprise/knative-serving/docs/install).\n\n\u003cbr /\u003e\n\nWarning: Performing the steps on this page will perform a new installation of Knative serving and irreversibly overwrite your previous non-fleet installation. Do not proceed with the following steps in your [clusters for which you previously enabled\nKnative serving](/kubernetes-engine/enterprise/knative-serving/archive/docs/setup). \n\nFor previous \"free-trial\" installations of Knative serving, you must first [upgrade Knative serving to use GKE Enterprise\nfleets](/kubernetes-engine/enterprise/knative-serving/docs/install/on-gcp/upgrade).\n\nUse this page to install the default components of Knative serving on\nyour GKE clusters in Google Cloud with the following configuration:\n\n- Knative serving on Google Cloud is configured for public clusters by\n default.\n\n- Cloud Monitoring metrics for GKE Enterprise on Google Cloud clusters are enabled by\n default.\n\nBefore you begin\n----------------\n\n- To install Knative serving in private clusters on Google Cloud, you must\n perform a [custom installation](/kubernetes-engine/enterprise/knative-serving/docs/install/on-gcp/custom).\n\n- You must ensure that you meet the\n [installation prerequisites](/kubernetes-engine/enterprise/knative-serving/docs/install/on-gcp/prerequisites).\n\n- If Knative serving is installed in your cluster, you must ensure that the\n \"*GKE add-on* \" does not exist before you perform these\n fleet component installation steps. If you have the \"*add-on* \" installed, you\n must instead [follow the steps for upgrading to GKE Enterprise\n fleets](/kubernetes-engine/enterprise/knative-serving/docs/install/on-gcp/upgrade).\n\n #### Check if the \"*GKE add-on*\" is\n installed.\n\n\n To check if your installation of Knative serving is the\n \"*GKE add-on*\", run the following command: \n\n ```bash\n gcloud container clusters describe \\\n CLUSTER_NAME \\\n --region CLUSTER_LOCATION \\\n --project PROJECT_ID --format='get(addonsConfig.cloudRunConfig)'\n ```\n\n\n Replace:\n - \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e with the name of your cluster.\n - \u003cvar translate=\"no\"\u003eCLUSTER_LOCATION\u003c/var\u003e with the [location](/compute/docs/regions-zones#identifying_a_region_or_zone) where your cluster is located.\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with the ID of your Google Cloud project.\n\n\n Results:\n - **\"*GKE add-on*\" not installed** :\n - Nothing is returned to your terminal if the add-on was never installed.\n - `disabled=true` is returned if the add-on was previously uninstalled.\n - **\"*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`\n\n Example:\n :\n The following example demonstrates that Knative serving was installed in the\n `my-addon-cluster` cluster through the \"*GKE add-on* \", which\n is configured to handle external traffic: \n\n ```bash\n gcloud container clusters describe my-addon-cluster \\\n --region us-central1-c --project my-gcp-project \\\n --format='get(addonsConfig.cloudRunConfig)'\n ```\n\n\n Response:\n\n ```bash\n loadBalancerType=LOAD_BALANCER_TYPE_EXTERNAL\n ```\n\n \u003cbr /\u003e\n\nInstalling Knative serving\n--------------------------\n\nTo install the default components of Knative serving:\n\n1. Enable Knative serving in your fleet:\n\n gcloud container fleet cloudrun enable --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 container fleet cloudrun enable](/sdk/gcloud/reference/container/hub/cloudrun/enable)\n reference.\n2. Optional: 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 container fleet 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 container fleet features list](/sdk/gcloud/reference/container/hub/features/list)\n reference.\n\n Result: \n\n NAME STATE\n appdevexperience ACTIVE\n\n3. For each GKE Enterprise cluster where you want to install Knative serving,\n\n run the corresponding command:\n\n gcloud container fleet cloudrun apply --gke-cluster=\u003cvar translate=\"no\"\u003eCLUSTER_LOCATION\u003c/var\u003e/\u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eCLUSTER_LOCATION\u003c/var\u003e with the [region or zone](/compute/docs/regions-zones#available) in which your cluster is located.\n - \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e with the ID of your cluster or the fully qualified identifier for the cluster.\n\n For details and additional options, see the\n [gcloud container fleet cloudrun apply](/sdk/gcloud/reference/container/hub/cloudrun/apply)\n reference.\n\n \u003cbr /\u003e\n\n\n4. Verify that Knative serving has been enabled in your cluster:\n 1. Open the Google Cloud console:\u003cbr /\u003e\n\n [Go to GKE clusters](https://console.cloud.google.com/kubernetes/list/overview)\n 2. Click on the name of your cluster to open the details pane.\u003cbr /\u003e\n\n \u003cbr /\u003e\n\n 3. 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\"}}'`\n 4. Verify that all Knative serving specific deployments are in running status under `knative-serving` and `appdevexperience` namespaces.\n\nWhat's next\n-----------\n\n[Set up your installation of Knative serving](/kubernetes-engine/enterprise/knative-serving/docs/setup)."]]