Memigrasikan traffic workload ke Cloud Service Mesh
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Langkah dalam proses ini memungkinkan Anda memilih cara meluncurkan perubahan. Anda
dapat menentukan jumlah awal traffic yang ingin dimigrasikan ke Cloud Service Mesh,
lalu secara bertahap meningkatkan peluncuran hingga 100%.
Ganti TRAFFIC_PERCENTAGE dengan persentase traffic yang ingin Anda
kirim ke ingress Cloud Service Mesh. Nilai yang valid adalah: 0, 10,
20, 30, 40, 50, 60, 70, 80, 90, 100.
Perhatikan bahwa jika Anda mengalami masalah dengan langkah ini atau ingin melakukan peluncuran
bertahap, Anda dapat menjalankan kembali perintah skrip migrasi ini beberapa kali hingga
mencapai 100%.
Misalnya, jika Anda memilih untuk memigrasikan 10% traffic, output terminal
selama prosesnya akan terlihat seperti berikut:
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
Anda dapat memantau traffic layanan di Google Cloud konsol:
Jika perlu melakukan rollback pada perubahan yang Anda buat melalui langkah-langkah di atas, Anda
dapat menggunakan skrip migrasi untuk menetapkan persentase traffic ke
traffic masuk Cloud Service Mesh kembali ke 0:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-04 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"]]