Arbeitslast-Traffic zu Cloud Service Mesh migrieren
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Bei diesem Schritt können Sie auswählen, wie Sie Ihre Änderungen einführen möchten. Sie können eine anfängliche Traffic-Menge angeben, die Sie zu Cloud Service Mesh migrieren möchten, und den Roll-out dann schrittweise auf 100 % erhöhen.
Ersetzen Sie TRAFFIC_PERCENTAGE durch den Prozentsatz des Traffics, den Sie an Cloud Service Mesh-Ingress senden möchten. Gültige Werte sind: 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100.
Wenn bei diesem Schritt Probleme auftreten oder Sie einen graduellen Roll-out durchführen möchten, können Sie diesen Befehl des Migrationsskripts mehrmals ausführen, bis 100 % erreicht sind.
Wenn Sie beispielsweise 10 % des Traffics migrieren, sieht die Terminalausgabe während des Prozesses etwa so aus:
In this step, 10% of traffic from the previously installed
version of Istio is migrated to the Cloud Service Mesh ingress.
Setting the number of replicas of Istio ingress to 9,
and the number of replicas of Cloud Service Mesh ingress to 1
deployment.apps/istio-ingress patched
Waiting for all istio-ingress pods to be ready
All istio-ingress pods are ready.
deployment.apps/istio-ingressgateway patched
Waiting for all istio-ingressgateway pods to be ready
All istio-ingressgateway pods are ready.
10% traffic has been migrated to Cloud Service Mesh ingress
Sie können den Traffic Ihrer Dienste in der Google Cloud Console überwachen:
Wenn Sie ein Rollback der Änderungen durchführen müssen, die Sie durch die obigen Schritte vorgenommen haben, können Sie mit dem Migrationsskript den Prozentsatz des Traffics zum Cloud Service Mesh-Ingress auf 0 zurücksetzen:
[[["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: 2025-04-22 (UTC)."],[],[],null,["# Migrate your workload traffic to Cloud Service Mesh\n\nThis step in the process allows you to choose how to rollout your changes. You\ncan specify an initial amount of traffic that you want migrate to Cloud Service Mesh\nand then gradually increase the rollout to 100%.\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\n### Migrate all workload traffic to Cloud Service Mesh\n\nIn this section, the [migration script](/kubernetes-engine/enterprise/knative-serving/docs/install/on-gcp/upgrade/prepare) is used to\nmigrate your existing all traffic to Cloud Service Mesh.\n\n1. Run the following command to set the percent of traffic you want migrated:\n\n ./migration-addon.sh --command migrate-traffic \u003cvar translate=\"no\"\u003eTRAFFIC_PERCENTAGE\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eTRAFFIC_PERCENTAGE\u003c/var\u003e with the percent of traffic that you\n want to send to the to Cloud Service Mesh ingress. Valid values are: `0`, `10`,\n `20`, `30`, `40`, `50`, `60`, `70`, `80`, `90`, `100`.\n\n Note that if you have any issues with this step or want to perform a gradual\n rollout, you can re-run this migration script command multiple times until\n you reach 100%.\n\n For example, if you choose to migrate 10% of traffic, the terminal output\n during the process looks similar to the following: \n\n In this step, 10% of traffic from the previously installed\n version of Istio is migrated to the Cloud Service Mesh ingress.\n\n Setting the number of replicas of Istio ingress to 9,\n and the number of replicas of Cloud Service Mesh ingress to 1\n deployment.apps/istio-ingress patched\n\n Waiting for all istio-ingress pods to be ready\n\n All istio-ingress pods are ready.\n deployment.apps/istio-ingressgateway patched\n\n Waiting for all istio-ingressgateway pods to be ready\n\n All istio-ingressgateway pods are ready.\n\n 10% traffic has been migrated to Cloud Service Mesh ingress\n\n | **Note:** The total number of Cloud Service Mesh ingress pods and Istio ingress pods are scaled to 10 even if you currently have less ingress pods.\n |\n |\n | You can run the following command to view the status of the `gke-system`. \n |\n | ```bash\n | kubectl describe pod -n gke-system\n | ```\n |\n |\n | If you receive the `FailedScheduling` warning, your cluster might\n | not have sufficient resources to scale to the necessary number of ingress\n | pods. To increase the number of nodes for your cluster and therefore,\n | increase the amount of available resources, see\n | [Resizing a\n | cluster](/kubernetes-engine/docs/how-to/resizing-a-cluster) in the Google Kubernetes Engine documentation.\n2. You can monitor your traffic of your services, in the Google Cloud console:\n\n [Go to Knative serving](https://console.cloud.google.com/kubernetes/run)\n\nWhat's next\n-----------\n\n[Finalize the upgrade and perform cleanup tasks](/kubernetes-engine/enterprise/knative-serving/docs/install/on-gcp/upgrade/finalize)\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 set the percentage of traffic to the\nCloud Service Mesh ingress back to `0`: \n\n ./migration-addon.sh --command migrate-traffic 0"]]