Migrate your workload traffic to Cloud Service Mesh

This step in the process allows you to choose how to rollout your changes. You can specify an initial amount of traffic that you want migrate to Cloud Service Mesh and then gradually increase the rollout to 100%.

Before you begin

Migrate all workload traffic to Cloud Service Mesh

In this section, the migration script is used to migrate your existing all traffic to Cloud Service Mesh.

  1. Run the following command to set the percent of traffic you want migrated:

    ./migration-addon.sh --command migrate-traffic TRAFFIC_PERCENTAGE
    

    Replace TRAFFIC_PERCENTAGE with the percent of traffic that you want to send to the to Cloud Service Mesh ingress. Valid values are: 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100.

    Note that if you have any issues with this step or want to perform a gradual rollout, you can re-run this migration script command multiple times until you reach 100%.

    For example, if you choose to migrate 10% of traffic, the terminal output during the process looks similar to the following:

    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
    
  2. You can monitor your traffic of your services, in the Google Cloud console:

    Go to Knative serving

What's next

Finalize the upgrade and perform cleanup tasks

Rollback

If you need to rollback the changes that you made through the steps above, you can use the migration script to set the percentage of traffic to the Cloud Service Mesh ingress back to 0:

./migration-addon.sh --command migrate-traffic 0