|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * service-mesh-docs-main/migrating/checklists/ossm-migrating-cluster-wide-assembly.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="ossm-migrating-a-cluster-wide-deployment-using-the-istio-injection-label_{context}"] |
| 7 | += Migrating workloads for cluster-wide deployment using the istio injection label |
| 8 | + |
| 9 | +Now you can migrate your workloads from the {SMProduct} 2.6 control plane to the {SMproduct} 3.0 control plane. |
| 10 | + |
| 11 | +[NOTE] |
| 12 | +==== |
| 13 | +You can migrate workloads and gateways separately, and in any order. For more information, see "Migrating gateways". |
| 14 | +==== |
| 15 | + |
| 16 | +.Procedure |
| 17 | + |
| 18 | +. Update the injection labels on the data plane namespace by running the following command: |
| 19 | ++ |
| 20 | +[source,terminal] |
| 21 | +---- |
| 22 | +$ oc label ns bookinfo istio.io/rev=ossm-3-v1-24-1 maistra.io/ignore-namespace="true" istio-injection- --overwrite=true |
| 23 | +---- |
| 24 | ++ |
| 25 | +The previous example adds two labels and removes one. |
| 26 | ++ |
| 27 | +The `istio.io/rev=ossm-3-v1-24-1` label ensures that 3.0 proxy gets injected to any new or restarted pods in the namespace. In the previous example, the 3.0 revision is named `ossm-3-v1-24-1`. |
| 28 | ++ |
| 29 | +The `maistra.io/ignore-namespace: "true"` label ensures that 2.6 control plane stops injecting proxies in this namespace to avoid conflicts between 2.6 and 3.0 side car injectors. |
| 30 | ++ |
| 31 | +The `istio-injection` label must be removed if it exists because it takes precedence over `istio.io/rev` label. Leaving the `istio-injection=enabled` label applied prevents proxy injection. |
| 32 | + |
| 33 | +. Restart the workloads by using one of the following options: |
| 34 | ++ |
| 35 | +.. To restart all the workloads at once so that the new pods are injected with the {SMProduct} 3.0 proxy, run the following command: |
| 36 | ++ |
| 37 | +.Example command for `bookinfo` application |
| 38 | +[source,terminal] |
| 39 | +---- |
| 40 | +$ oc rollout restart deployments -n bookinfo |
| 41 | +---- |
| 42 | + |
| 43 | +.. To restart each workload individually, run the following command for each workload: |
| 44 | ++ |
| 45 | +.Example command with `bookinfo` application |
| 46 | +[source,terminal] |
| 47 | +---- |
| 48 | +$ oc rollout restart deployments productpage-v1 -n bookinfo |
| 49 | +---- |
| 50 | + |
| 51 | +. Wait for the `productpage` application to restart by running the following command: |
| 52 | ++ |
| 53 | +[source,terminal] |
| 54 | +---- |
| 55 | +$ oc rollout status deployment productpage-v1 -n bookinfo |
| 56 | +---- |
| 57 | + |
| 58 | +.Verification |
| 59 | + |
| 60 | +. Ensure that expected workloads are managed by the new control plane by running the following command: |
| 61 | ++ |
| 62 | +[source,terminal] |
| 63 | +---- |
| 64 | +$ istioctl ps -n bookinfo |
| 65 | +---- |
| 66 | ++ |
| 67 | +.Sample output: |
| 68 | +[source,terminal] |
| 69 | +---- |
| 70 | +$ istioctl ps -n bookinfo |
| 71 | +NAME CLUSTER CDS LDS EDS RDS ECDS ISTIOD VERSION |
| 72 | +details-v1-7f46897b-d497c.bookinfo Kubernetes SYNCED SYNCED SYNCED SYNCED NOT SENT istiod-install-istio-system-866b57d668-6lpcr 1.20.8 |
| 73 | +productpage-v1-74bfbd4d65-vsxqm.bookinfo Kubernetes SYNCED (4s) SYNCED (4s) SYNCED (3s) SYNCED (4s) IGNORED istiod-ossm-3-v1-24-1-797bb4d78f-xpchx 1.24.1 |
| 74 | +ratings-v1-559b64556-c5ppg.bookinfo Kubernetes SYNCED SYNCED SYNCED SYNCED NOT SENT istiod-install-istio-system-866b57d668-6lpcr 1.20.8 |
| 75 | +reviews-v1-847fb7c54d-qxt5d.bookinfo Kubernetes SYNCED SYNCED SYNCED SYNCED NOT SENT istiod-install-istio-system-866b57d668-6lpcr 1.20.8 |
| 76 | +reviews-v2-5c7ff5b77b-8jbhd.bookinfo Kubernetes SYNCED SYNCED SYNCED SYNCED NOT SENT istiod-install-istio-system-866b57d668-6lpcr 1.20.8 |
| 77 | +reviews-v3-5c5d764c9b-rrx8w.bookinfo Kubernetes SYNCED SYNCED SYNCED SYNCED NOT SENT istiod-install-istio-system-866b57d668-6lpcr 1.20.8 |
| 78 | +---- |
| 79 | ++ |
| 80 | +Even if there are different versions of the proxies communication between services should work. |
| 81 | + |
| 82 | +. If the 2.6 installation contains additional namespaces, migrate the next namespace now. |
| 83 | ++ |
| 84 | +[Important] |
| 85 | +==== |
| 86 | +Do not remove the `maistra.io/ignore-namespace="true"` label until the 2.6 control plane is uninstalled. |
| 87 | +==== |
0 commit comments