Este contenido no está disponible en el idioma seleccionado.
Chapter 4. Cluster-wide migration guide
4.1. Cluster-wide migration guide Copiar enlaceEnlace copiado en el portapapeles!
This guide is for users who are running a cluster-wide deployment of Red Hat OpenShift Service Mesh 2.6.9 and are migrating to OpenShift Service Mesh 3.0.
You must complete the premigration checklists before you start migrating your deployment.
4.1.1. Control plane configuration migration requirements Copiar enlaceEnlace copiado en el portapapeles!
During the migration process, two cluster-wide control planes run in the same cluster while the data plane namespaces are gradually migrated to the Red Hat OpenShift Service Mesh 3.0 installation. One control plane is associated with the Red Hat OpenShift Service Mesh 2.6.9 installation and the other is associated with the OpenShift Service Mesh 3.0 installation. You must carefully plan the migration steps to avoid possible conflicts between the two control planes.
4.1.1.1. Root certificate Copiar enlaceEnlace copiado en el portapapeles!
During the migration, both control planes must share a root certificate. To share a root certificate between both control planes, you install the 3.0 control plane into the same namespace as 2.6 control plane. The migration procedures show how to verify that the root certificate is shared.
4.1.1.2. Discovery selectors and namespace access Copiar enlaceEnlace copiado en el portapapeles!
Both control planes must have access to all namespaces in the mesh. During the migration, some proxies are controlled by the 3.0 control plane while other proxies remain controlled by the 2.6 control plane. To ensure that mesh communication works during the migration, both control planes must detect the same set of services. Service discovery is provided by istiod component, which runs in the control plane namespace.
In the OpenShift Service Mesh 3.0 installation, you can control how Istio discovers services by using discovery selectors. When you use discovery selectors, ensure that the discoverySelectors expression that is defined in the OpenShift Service Mesh 3.0 Istio resource match the namespaces that comprise the OpenShift Service Mesh 2.6 mesh. You might have to add additional labels to the OpenShift Service Mesh 2.6 application namespaces to ensure that they are captured in the OpenShift Service Mesh 3.0 installation. For more information, see "Scoping the service mesh with DiscoverySelectors".
In OpenShift Service Mesh 2.6 installations, the maistra.io/member-of label is automatically created. This label cannot be used because it is automatically removed during the migration process.
4.1.1.3. Network policies Copiar enlaceEnlace copiado en el portapapeles!
By default, OpenShift Service Mesh 2.6 manages network policies that block traffic to the 3.0 control plane.
For both control planes, during the migration ensure that network policies do not block traffic between the following entities:
- The control plane and the data plane namespaces
- The data plane namespaces and the control plane
- The data plane namespaces themselves
In the premigration checklist, you are instructed to disable network policies. However, you can manually re-create them. Manually created network policies must allow traffic for both control planes. When a data plane namespace is migrated to 3.0, the maistra.io/member-of label is automatically removed. Do not use this label in network policies. For more information, see "Set up network policies to use during migration".
In OpenShift Service Mesh 2.6 installations, the maistra.io/member-of label is automatically created. This label cannot be used because it is automatically removed during the migration process.
Incorrectly configured network policies can disrupt mesh traffic. When you run the migration, be careful when you create network policies to prevent traffic disruption. For more information, see "Set up network policies to use during migration".
4.1.1.4. Sidecar injection Copiar enlaceEnlace copiado en el portapapeles!
If both control planes try to perform sidecar injection, the proxy will not start and the migration cannot be completed. To ensure that only one control plane performs sidecar injection during the migration, use injection labels. For more information, see "Installing the Sidecar".
During the migration, you must disable the 2.6 injector. Use the maistra.io/ignore-namespace: "true" label to prevent the 2.6 control plane from injecting a proxy in the namespace.
4.1.1.5. Label selection Copiar enlaceEnlace copiado en el portapapeles!
For OpenShift Service Mesh 3.0, you must decide if you want to use the istio.io/rev label or the istio-injection label to configure sidecar injection. For more information, see "About sidecar injection".
In the OpenShift Service Mesh 2.6 installation, the member selection configuration in the ServiceMeshMemberRoll resource can impact how injection labels are used in the OpenShift Service Mesh 3.0 installation.
By default, in a 2.6 installation, the spec.memberSelectors field in the ServiceMeshMemberRoll resource is configured to match the istio-injection=enabled label and all of the data plane namespaces in a 2.6 installation have the istio-injection=enabled label applied. If you are using the default 2.6 installation settings, you can keep using that label or switch to the istio.io/rev label for the 3.0 installation.
If the spec.memberSelectors field in the ServiceMeshMemberRoll resource is not configured to match the istio-injection=enabled label and the 2.6 data plane namespace uses a custom label, you must add the istio.io/rev label or the istio-injection label during the migration. The custom labels defined in the spec.memberSelectors parameter of the ServiceMeshMemberRoll resource have no effect on sidecar injection in the OpenShift Service Mesh 3 installation and cannot be used.
If projects in the 2.6 installation were added to the mesh by manually creating the ServiceMeshMember resource, you must add the istio.io/rev or istio-injection label to the project namespaces during the migration.
4.1.2. Cluster-wide migration methods Copiar enlaceEnlace copiado en el portapapeles!
You can migrate the control plane from Red Hat OpenShift Service Mesh 2.6.9 to OpenShift Service Mesh 3.0 by using one of the following methods:
-
Applying the
istio.io/revlabel -
Applying the
istio-injection=enabledlabel Performing a simple migration by using the
istio-injection=enabledlabelNoteThe simple migration method might introduce traffic disruptions.
To select the best migration method for your OpenShift Service Mesh installation, you must understand the difference between the istio.io/rev and istio-injection labels. Read through all the migration methods before choosing the one that best fits your needs.
4.1.3. Migrating a cluster-wide deployment by using the Istio revision label Copiar enlaceEnlace copiado en el portapapeles!
You can perform a canary upgrade with the gradual migration of data plane namespaces for a cluster-wide deployment by using the istio.io/rev label.
The bookinfo example application is being used for demonstration purposes with a minimal example for the Istio resource. For more information on configuration differences between the OpenShift Service Mesh 2 ServiceMeshControlPlane resource and the OpenShift Service Mesh 3 Istio resource, see "Configuration fields mapping between Service Mesh 2 and Service Mesh 3".
You can follow these same steps with your own workloads.
Prerequisites
- You have deployed OpenShift Container Platform 4.14 or later.
-
You have logged in to the OpenShift Container Platform web console as a user with the
cluster-adminrole. - You have completed the premigration checklists.
- You have the OpenShift Service Mesh 2.6.9 Operator installed.
- You have the OpenShift Service Mesh 3 Operator installed.
-
You have created an
IstioCNIresource. -
You have installed the
istioctltool. - You are running a cluster-wide Service Mesh control plane resource.
-
You have installed the
bookinfoapplication.
Procedure
Identify the namespaces that contain a 2.6 control plane by running the following command:
oc get smcp -A
$ oc get smcp -ACopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAMESPACE NAME READY STATUS PROFILES VERSION AGE istio-system install-istio-system 6/6 ComponentsReady ["default"] 2.6.6 115m
NAMESPACE NAME READY STATUS PROFILES VERSION AGE istio-system install-istio-system 6/6 ComponentsReady ["default"] 2.6.6 115mCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a YAML file named
ossm-3.yamlthat creates the Istio resource for the 3.0 installation in the same namespace as theServiceMeshControlPlaneresource for the 2.6 installation.NoteIn the following example configuration, the Istio control plane has access to all namespaces on the cluster. If you want limit the namespaces the control plan has access to, you must define discovery selectors. All data plane namespaces that you plan to migrate from version 2.6 must be matched.
Example
IstioresourceCopy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- The
name,updateStrategyandversionfields specify how theIstioRevisionresource name is created. For more information, see "Identifying the revision name". - 2
- The 3.0 and 2.6 control planes must run in the same namespace.
- 3
- If you are migrating metrics and tracing, update the
extensionProvidersfields according to your tracing and metrics configurations.
Apply the YAML file by running the following command:
oc apply -f ossm-3.yaml
$ oc apply -f ossm-3.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the new
istiodresource uses the existing root certificate by running the following command:oc logs deployments/istiod-ossm-3-v1-24-3 -n istio-system | grep 'Load signing key and cert from existing secret'
$ oc logs deployments/istiod-ossm-3-v1-24-3 -n istio-system | grep 'Load signing key and cert from existing secret'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
2024-12-18T08:13:53.788959Z info pkica Load signing key and cert from existing secret istio-system/istio-ca-secret
2024-12-18T08:13:53.788959Z info pkica Load signing key and cert from existing secret istio-system/istio-ca-secretCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.1.3.1. Migrating workloads by using the Istio revision label Copiar enlaceEnlace copiado en el portapapeles!
Now you can migrate your workloads from the OpenShift Service Mesh 2.6 control plane to the OpenShift Service Mesh 3.0 control plane.
Revision tags are not used in this example for simplicity. When migrating large meshes, you can use revision tags to avoid re-labeling all namespaces during future version 3 updates.
You can migrate workloads and gateways separately, and in any order. For more information, see "Migrating gateways".
Procedure
Find the current
IstioRevisionfor your OpenShift Service Mesh 3.0 control plane by running the following command:oc get istios
$ oc get istiosCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAME REVISIONS READY IN USE ACTIVE REVISION STATUS VERSION AGE ossm-3 1 1 0 ossm-3-v1-24-3 Healthy v1.24.3 30s
NAME REVISIONS READY IN USE ACTIVE REVISION STATUS VERSION AGE ossm-3 1 1 0 ossm-3-v1-24-3 Healthy v1.24.3 30sCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy the value in the
ACTIVE REVISIONcolumn to use as youristio.io/revlabel in the next step.NoteThe naming format of your revisions depends on which upgrade strategy you choose for your
Istioinstance.Update the injection labels on the
dataplanenamespace by running the following command:oc label ns bookinfo istio.io/rev=ossm-3-v1-24-3 maistra.io/ignore-namespace="true" istio-injection- --overwrite=true
$ oc label ns bookinfo istio.io/rev=ossm-3-v1-24-3 maistra.io/ignore-namespace="true" istio-injection- --overwrite=trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow Running the command performs the following actions:
-
Removes the
istio-injectionlabel: This label prevents the 3.0 control plane from injecting the proxy. Theistio-injectionlabel takes precedence overistio.io/revlabel. -
Adds the
istio.io/rev=ossm-3-v1-24-3label: This label ensures that any newly created or restarted pods in the namespace connect to the OpenShift Service Mesh 3.0 proxy. Adds the
maistra.io/ignore-namespace: "true"label: This label disables sidecar injection for OpenShift Service Mesh 2.6 proxies in the namespace. With the label applied, OpenShift Service Mesh 2.6 stops injecting proxies in this namespace, and any new proxies are injected by OpenShift Service Mesh 3.0. Without this label, the OpenShift Service Mesh 2.6 injection webhook tries to inject the pod and the injected sidecar proxy refuses to start since it will have both the OpenShift Service Mesh 2.6 and the OpenShift Service Mesh 3.0 Container Network Interface(CNI) annotations.NoteOnce you apply the
maistra.io/ignore-namespacelabel, any new pod that gets created in the namespace connects to the OpenShift Service Mesh 3.0 proxy. Workloads can still communicate with each other regardless of which control plane they are connected to.
-
Removes the
Restart the workloads by using one of the following options:
To restart all the workloads at once so that the new pods are injected with the OpenShift Service Mesh 3.0 proxy, run the following command:
Example command for
bookinfoapplicationoc rollout restart deployments -n bookinfo
$ oc rollout restart deployments -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow To restart each workload individually, run the following command for each workload:
Example command with
bookinfoapplicationoc rollout restart deployments productpage-v1 -n bookinfo
$ oc rollout restart deployments productpage-v1 -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Wait for the
productpageapplication to restart by running the following command:oc rollout status deployment productpage-v1 -n bookinfo
$ oc rollout status deployment productpage-v1 -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Ensure that expected workloads are managed by the new control plane by running the following command:
istioctl ps -n bookinfo
$ istioctl ps -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The previous output shows that the
productpage-v1deployment is the only deployment that restarted and was injected with the 3.0 proxy. Even if there are different versions of the proxies, communication between services still works.If the 2.6 installation contains additional data plane namespaces, migrate the next namespace now.
NoteDo not remove the
maistra.io/ignore-namespace="true"label until the 2.6 control plane is uninstalled.
Next steps
If you are using gateways, you must migrate them before you complete the migration process.
If you are not using gateways, and have verified your cluster-wide migration, you can proceed to complete the migration and remove OpenShift Service Mesh 2 resources.
4.1.4. Migrating a cluster-wide deployment by using the Istio revision label with cert-manager Copiar enlaceEnlace copiado en el portapapeles!
You can perform a canary upgrade with the gradual migration of data plane namespaces for a cluster-wide deployment by using the istio.io/rev label.
The bookinfo example application is being used for demonstration purposes with a minimal example for the Istio resource. For more information on configuration differences between the OpenShift Service Mesh 2 ServiceMeshControlPlane resource and the OpenShift Service Mesh 3 Istio resource, see "Configuration fields mapping between Service Mesh 2 and Service Mesh 3".
You can follow these same steps with your own workloads.
Prerequisites
- You have deployed OpenShift Container Platform 4.14 or later.
-
You have logged in to the OpenShift Container Platform web console as a user with the
cluster-adminrole. - You have completed the premigration checklists.
- You have the OpenShift Service Mesh 2.6.9 Operator installed.
- You have the OpenShift Service Mesh 3 Operator installed.
-
You have created an
IstioCNIresource. -
You have installed the
istioctltool. - You are using the cert-manager and istio-csr tools in a cluster-wide deployment.
-
Your OpenShift Service Mesh 2.6.9
ServiceMeshControlPlaneresource is configured with the cert-manager tool. -
You have installed the
bookinfoapplication.
Procedure
Confirm that your OpenShift Service Mesh 2
ServiceMeshControlPlaneresource is configured with the cert-manager tool.Example
ServiceMeshControlPlanecert-manager configurationCopy to Clipboard Copied! Toggle word wrap Toggle overflow Update the
istio-csrdeployment to include your OpenShift Service Mesh 3 control plane by running the following command:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- The
app.istio.revisionsfield must include your OpenShift Service Mesh 3.0 control plane revision before you create yourIstioresource so that proxies can properly communicate with the OpenShift Service Mesh 3.0 control plane.
Identify the namespaces that contain a 2.6 control plane by running the following command:
oc get smcp -A
$ oc get smcp -ACopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAMESPACE NAME READY STATUS PROFILES VERSION AGE istio-system install-istio-system 6/6 ComponentsReady ["default"] 2.6.6 115m
NAMESPACE NAME READY STATUS PROFILES VERSION AGE istio-system install-istio-system 6/6 ComponentsReady ["default"] 2.6.6 115mCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a YAML file named
ossm-3.yamlthat creates the Istio resource for the 3.0 installation in the same namespace as theServiceMeshControlPlaneresource for the 2.6 installation.NoteIn the following example configuration, the Istio control plane has access to all namespaces on the cluster. If you want limit the namespaces the control plan has access to, you must define discovery selectors. All data plane namespaces that you plan to migrate from version 2.6 must be matched.
Example
IstioresourceCopy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- The
name,updateStrategyandversionfields specify how theIstioRevisionresource name is created. For more information, see "Identifying the revision name". - 2
- The 3.0 and 2.6 control planes must run in the same namespace.
- 3
- If you are migrating metrics and tracing, update the
extensionProvidersfields according to your tracing and metrics configurations.
Apply the YAML file by running the following command:
oc apply -f ossm-3.yaml
$ oc apply -f ossm-3.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the new
istiodresource uses the existing root certificate by running the following command:oc logs deployments/istiod-ossm-3-v1-24-3 -n istio-system | grep 'Load signing key and cert from existing secret'
$ oc logs deployments/istiod-ossm-3-v1-24-3 -n istio-system | grep 'Load signing key and cert from existing secret'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
2024-12-18T08:13:53.788959Z info pkica Load signing key and cert from existing secret istio-system/istio-ca-secret
2024-12-18T08:13:53.788959Z info pkica Load signing key and cert from existing secret istio-system/istio-ca-secretCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.1.4.1. Migrating workloads by using the Istio revision label with cert-manager Copiar enlaceEnlace copiado en el portapapeles!
Now you can migrate your workloads from the OpenShift Service Mesh 2.6 control plane to the OpenShift Service Mesh 3.0 control plane.
Revision tags are not used in this example for simplicity. When migrating large meshes, you can use revision tags to avoid re-labeling all namespaces during future version 3 updates.
You can migrate workloads and gateways separately, and in any order. For more information, see "Migrating gateways".
Procedure
Find the current
IstioRevisionfor your OpenShift Service Mesh 3.0 control plane by running the following command:oc get istios
$ oc get istiosCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAME REVISIONS READY IN USE ACTIVE REVISION STATUS VERSION AGE ossm-3 1 1 0 ossm-3-v1-24-3 Healthy v1.24.3 30s
NAME REVISIONS READY IN USE ACTIVE REVISION STATUS VERSION AGE ossm-3 1 1 0 ossm-3-v1-24-3 Healthy v1.24.3 30sCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy the value in the
ACTIVE REVISIONcolumn to use as youristio.io/revlabel in the next step.NoteThe naming format of your revisions depends on which upgrade strategy you choose for your
Istioinstance.Update the injection labels on the
dataplanenamespace by running the following command:oc label ns bookinfo istio.io/rev=ossm-3-v1-24-3 maistra.io/ignore-namespace="true" istio-injection- --overwrite=true
$ oc label ns bookinfo istio.io/rev=ossm-3-v1-24-3 maistra.io/ignore-namespace="true" istio-injection- --overwrite=trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow Running the command performs the following actions:
-
Removes the
istio-injectionlabel: This label prevents the 3.0 control plane from injecting the proxy. Theistio-injectionlabel takes precedence overistio.io/revlabel. -
Adds the
istio.io/rev=ossm-3-v1-24-3label: This label ensures that any newly created or restarted pods in the namespace connect to the OpenShift Service Mesh 3.0 proxy. Adds the
maistra.io/ignore-namespace: "true"label: This label disables sidecar injection for OpenShift Service Mesh 2.6 proxies in the namespace. With the label applied, OpenShift Service Mesh 2.6 stops injecting proxies in this namespace, and any new proxies are injected by OpenShift Service Mesh 3.0. Without this label, the OpenShift Service Mesh 2.6 injection webhook tries to inject the pod and the injected sidecar proxy refuses to start since it will have both the OpenShift Service Mesh 2.6 and the OpenShift Service Mesh 3.0 Container Network Interface(CNI) annotations.NoteOnce you apply the
maistra.io/ignore-namespacelabel, any new pod that gets created in the namespace connects to the OpenShift Service Mesh 3.0 proxy. Workloads can still communicate with each other regardless of which control plane they are connected to.
-
Removes the
Restart the workloads by using one of the following options:
To restart all the workloads at once so that the new pods are injected with the OpenShift Service Mesh 3.0 proxy, run the following command:
Example command for
bookinfoapplicationoc rollout restart deployments -n bookinfo
$ oc rollout restart deployments -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow To restart each workload individually, run the following command for each workload:
Example command with
bookinfoapplicationoc rollout restart deployments productpage-v1 -n bookinfo
$ oc rollout restart deployments productpage-v1 -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Wait for the
productpageapplication to restart by running the following command:oc rollout status deployment productpage-v1 -n bookinfo
$ oc rollout status deployment productpage-v1 -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Ensure that expected workloads are managed by the new control plane by running the following command:
istioctl ps -n bookinfo
$ istioctl ps -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The previous output shows that the
productpage-v1deployment is the only deployment that restarted and was injected with the 3.0 proxy. Even if there are different versions of the proxies, communication between services still works.If the 2.6 installation contains additional data plane namespaces, migrate the next namespace now.
NoteDo not remove the
maistra.io/ignore-namespace="true"label until the 2.6 control plane is uninstalled.
Next steps
If you are using gateways, you must migrate them before you complete the migration process.
If you are not using gateways, and have verified your cluster-wide migration, you can proceed to complete the migration and remove OpenShift Service Mesh 2 resources.
4.1.5. Migrating a cluster-wide deployment by using the Istio injection label Copiar enlaceEnlace copiado en el portapapeles!
You can perform a canary upgrade with the gradual migration of data plane namespaces for a cluster-wide deployment by using the istio-injection=enabled label and the default revision tag.
You must re-label all of the data plane namespaces. However, it is safe to restart any of the workloads at any point during the migration process.
The bookinfo application is used as an example for the Istio resource. For more information about configuration differences between the OpenShift Service Mesh 2 ServiceMeshControlPlane resource and the OpenShift Service Mesh 3 Istio resource, see "ServiceMeshControlPlane resource to Istio resource fields mapping".
Prerequisites
- You have deployed OpenShift Container Platform 4.14 or later.
-
You are logged in to the OpenShift Container Platform web console as a user with the
cluster-adminrole. - You have completed the premigration checklists.
- You have the OpenShift Service Mesh 2.6.9 Operator installed.
- You have the OpenShift Service Mesh 3 Operator installed.
-
You have created an
IstioCNIresource. -
You have installed the
istioctltool. - You are running a cluster-wide Service Mesh control plane resource.
-
You have installed the
bookinfoapplication.
Procedure
Identify the namespaces that contain a 2.6 control plane by running the following command:
oc get smcp -A
$ oc get smcp -ACopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAMESPACE NAME READY STATUS PROFILES VERSION AGE istio-system install-istio-system 6/6 ComponentsReady ["default"] 2.6.6 115m
NAMESPACE NAME READY STATUS PROFILES VERSION AGE istio-system install-istio-system 6/6 ComponentsReady ["default"] 2.6.6 115mCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a YAML file named
ossm-3.yaml. This procedure creates the Istio resource for the 3.0 installation in the same namespace as theServiceMeshControlPlaneresource for the 2.6 installation.NoteIn the following example configuration, the Istio control plane has access to all namespaces on the cluster. If you want to limit the namespaces the control plan has access to, you must define discovery selectors. You must match all the data plane namespaces that you plan to migrate from version 2.6.
Example
IstioresourceCopy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- The
name,updateStrategyandversionfields specify how theIstioRevisionresource name is created. For more information, see "Identifying the revision name". - 2
- The 3.0 and 2.6 control planes must run in the same namespace.
- 3
- Optional: If you are migrating metrics and tracing, update the
extensionProvidersfields according to your tracing and metrics configurations.
NoteTo prevent the OpenShift Service Mesh 3.0 control plane from injecting proxies in the namespaces that have the
istio-injection=enabledlabel applied and are still managed by OpenShift Service Mesh 2.6 control plane, do not use use thedefaultname for the Istio resource, and do not create thedefaultrevision tag in the following steps. You create thedefaultrevision tag later in this procedure.Apply the YAML file by running the following command:
oc apply -f ossm-3.yaml
$ oc apply -f ossm-3.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify that the new
istiodresource uses the existing root certificate by running the following command:oc logs deployments/istiod-ossm-3-v1-24-3 -n istio-system | grep 'Load signing key and cert from existing secret'
$ oc logs deployments/istiod-ossm-3-v1-24-3 -n istio-system | grep 'Load signing key and cert from existing secret'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
2024-12-18T08:13:53.788959Z info pkica Load signing key and cert from existing secret istio-system/istio-ca-secret
2024-12-18T08:13:53.788959Z info pkica Load signing key and cert from existing secret istio-system/istio-ca-secretCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.1.5.1. Migrating workloads by using the Istio injection label Copiar enlaceEnlace copiado en el portapapeles!
Now you can migrate your workloads from the OpenShift Service Mesh 2.6 control plane to the OpenShift Service Mesh 3.0 control plane.
You can migrate workloads and gateways separately, and in any order. For more information, see "Migrating gateways".
Procedure
Find the current
IstioRevisionresource for your OpenShift Service Mesh 3.0 control plane by running the following command:oc get istios
$ oc get istiosCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAME REVISIONS READY IN USE ACTIVE REVISION STATUS VERSION AGE ossm-3 1 1 0 ossm-3-v1-24-3 Healthy v1.24.3 30s
NAME REVISIONS READY IN USE ACTIVE REVISION STATUS VERSION AGE ossm-3 1 1 0 ossm-3-v1-24-3 Healthy v1.24.3 30sCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy the
ACTIVE REVISIONvalue to use as youristio.io/revlabel in the next step.NoteThe naming format of your revisions depends on which upgrade strategy you choose for your
Istioinstance.Update the injection labels on the data plane namespace by running the following command:
oc label ns bookinfo istio.io/rev=ossm-3-v1-24-3 maistra.io/ignore-namespace="true" istio-injection- --overwrite=true
$ oc label ns bookinfo istio.io/rev=ossm-3-v1-24-3 maistra.io/ignore-namespace="true" istio-injection- --overwrite=trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow The
oc labelcommand performs the following actions:-
Removes the
istio-injectionlabel: This label prevents the 3.0 control plane from injecting the proxy. Theistio-injectionlabel takes precedence over theistio.io/revlabel. You must temporarily remove theistio-injection=enabledbecause you cannot create the defaultIstioRevisionTagtag yet. Leaving theistio-injection=enabledlabel applied would prevent the 3.0 control plane from performing proxy injection. -
Adds the
istio.io/rev=ossm-3-v1-24-3label: This label ensures that any newly created or restarted pods in the namespace connect to the OpenShift Service Mesh 3.0 proxy. Adds the
maistra.io/ignore-namespace: "true"label: This label disables sidecar injection for OpenShift Service Mesh 2.6 proxies in the namespace. With the label applied, OpenShift Service Mesh 2.6 stops injecting proxies in this namespace, and any new proxies are injected by OpenShift Service Mesh 3.0. Without this label, the OpenShift Service Mesh 2.6 injection webhook tries to inject the pod and the injected sidecar proxy refuses to start since it will has both the OpenShift Service Mesh 2.6 and the OpenShift Service Mesh 3.0 Container Network Interface(CNI) annotations.NoteAfter you apply the
maistra.io/ignore-namespacelabel, any new pod that gets created in the namespace connects to the OpenShift Service Mesh 3.0 proxy. Workloads can still communicate with each other regardless of which control plane they are connected to.
-
Removes the
Restart the workloads by using one of the following options:
To restart all the workloads at the same time so that the new pods are injected with the OpenShift Service Mesh 3.0 proxy, run the following command:
Example command for
bookinfoapplicationoc rollout restart deployments -n bookinfo
$ oc rollout restart deployments -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow To restart each workload individually, run the following command for each workload:
Example command for
bookinfoapplicationoc rollout restart deployments productpage-v1 -n bookinfo
$ oc rollout restart deployments productpage-v1 -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Wait for the
productpageapplication to restart by running the following command:oc rollout status deployment productpage-v1 -n bookinfo
$ oc rollout status deployment productpage-v1 -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify that the the new control plane manages the expected workloads by running the following command:
istioctl ps -n bookinfo
$ istioctl ps -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The output shows that the
productpage-v1deployment is the only deployment that has been restarted and was injected with the 3.0 proxy. Even if there are different versions of the proxies, communication between the services still works.If the 2.6 installation contains additional namespaces, migrate the next namespace now.
NoteRemove the
maistra.io/ignore-namespace="true"label only after the 2.6 control plane has been uninstalled.
Next steps
If you are using gateways, you must migrate them before you complete the migration process.
If you are not using gateways, and have verified your cluster-wide migration, create a default revision tag and relabel namespaces.
4.1.5.2. Creating the default revision tag and relabeling the namespaces Copiar enlaceEnlace copiado en el portapapeles!
You can create the default revision tag and relabel the namespaces after you have completed the OpenShift Service Mesh 2 to OpenShift Service Mesh 3 cluster-wide migration process by using the Istio injection label.
The bookinfo application is used as an example.
Prerequisites
- You have completed the OpenShift Service Mesh 2 to OpenShift Service Mesh 3 cluster-wide migration process by using Istio injection label.
Procedure
Create a YAML file called
rev-tag.yamlthat defines theIstioRevisionTagresource:Example
IstioRevisionTagresourceCopy to Clipboard Copied! Toggle word wrap Toggle overflow Apply the YAML file by running the following command:
oc apply -f rev-tag.yaml
$ oc apply -f rev-tag.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify the status of the
IstioRevisionTagresource by running the following command:oc get istiorevisiontags
$ oc get istiorevisiontagsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NNAME STATUS IN USE REVISION AGE default NotReferencedByAnything False ossm-3-v1-24-3 18s
NNAME STATUS IN USE REVISION AGE default NotReferencedByAnything False ossm-3-v1-24-3 18sCopy to Clipboard Copied! Toggle word wrap Toggle overflow Add the
istio-injection=enabledlabel to thebookinfonamespace, and remove theistio.io/revlabel by running the following command:oc label ns bookinfo istio-injection=enabled istio.io/rev-
$ oc label ns bookinfo istio-injection=enabled istio.io/rev-Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteRemove the
maistra.io/ignore-namespace="true"label only after the 2.6 control plane has been uninstalled.Restart the workloads by running the following command:
oc rollout restart deployments -n bookinfo
$ oc rollout restart deployments -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteRepeat steps 4 and 5 for each namespace you are migrating.
Verification
Verify that the
IstioRevisionTagresource is in use by running the following command:oc get istiorevisiontags
$ oc get istiorevisiontagsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAME STATUS IN USE REVISION AGE default Healthy True ossm-3-v1-24-3 28s
NAME STATUS IN USE REVISION AGE default Healthy True ossm-3-v1-24-3 28sCopy to Clipboard Copied! Toggle word wrap Toggle overflow Ensure that expected workloads are managed by the new control plane by running the following command:
istioctl ps -n bookinfo
$ istioctl ps -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Next steps
You can proceed to complete the migration and remove OpenShift Service Mesh 2 resources.
Before creating a default revision tag and relabelling the namespaces, you must migrate all remaining workload namespaces, including gateways.
4.1.6. Migrating a cluster-wide deployment by using the Istio injection label with cert-manager Copiar enlaceEnlace copiado en el portapapeles!
You can perform a canary upgrade with the gradual migration of data plane namespaces for a cluster-wide deployment by using the istio-injection=enabled label and the default revision tag.
You must re-label all of the data plane namespaces. However, it is safe to restart any of the workloads at any point during the migration process.
The bookinfo application is used as an example for the Istio resource. For more information about configuration differences between the OpenShift Service Mesh 2 ServiceMeshControlPlane resource and the OpenShift Service Mesh 3 Istio resource, see "ServiceMeshControlPlane resource to Istio resource fields mapping".
Prerequisites
- You have deployed OpenShift Container Platform 4.14 or later.
-
You are logged in to the OpenShift Container Platform web console as a user with the
cluster-adminrole. - You have completed the premigration checklists.
- You have the OpenShift Service Mesh 2.6.9 Operator installed.
- You have the OpenShift Service Mesh 3 Operator installed.
-
You have created an
IstioCNIresource. -
You have installed the
istioctltool. - You are using the cert-manager and istio-csr tools in a cluster-wide deployment.
-
Your OpenShift Service Mesh 2.6.9
ServiceMeshControlPlaneresource is configured with the cert-manager tool -
You have installed the
bookinfoapplication.
Procedure
Confirm that your OpenShift Service Mesh 2
ServiceMeshControlPlaneresource is configured with the cert-manager tool.Example
ServiceMeshControlPlanecert-manager configurationCopy to Clipboard Copied! Toggle word wrap Toggle overflow Update the
istio-csrdeployment to include your OpenShift Service Mesh 3 control plane by running the following command:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- The
app.istio.revisionsfield must include your OpenShift Service Mesh 3.0 control plane revision before you create yourIstioresource so that proxies can properly communicate with the OpenShift Service Mesh 3.0 control plane.
Identify the namespaces that contain a 2.6 control plane by running the following command:
oc get smcp -A
$ oc get smcp -ACopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAMESPACE NAME READY STATUS PROFILES VERSION AGE istio-system install-istio-system 6/6 ComponentsReady ["default"] 2.6.6 115m
NAMESPACE NAME READY STATUS PROFILES VERSION AGE istio-system install-istio-system 6/6 ComponentsReady ["default"] 2.6.6 115mCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a YAML file named
ossm-3.yaml. This procedure creates the Istio resource for the 3.0 installation in the same namespace as theServiceMeshControlPlaneresource for the 2.6 installation.NoteIn the following example configuration, the Istio control plane has access to all namespaces on the cluster. If you want to limit the namespaces the control plan has access to, you must define discovery selectors. You must match all the data plane namespaces that you plan to migrate from version 2.6.
Example
IstioresourceCopy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- The
name,updateStrategyandversionfields specify how theIstioRevisionresource name is created. For more information, see "Identifying the revision name". - 2
- The 3.0 and 2.6 control planes must run in the same namespace.
- 3
- Optional: If you are migrating metrics and tracing, update the
extensionProvidersfields according to your tracing and metrics configurations.
NoteTo prevent the OpenShift Service Mesh 3.0 control plane from injecting proxies in the namespaces that have the
istio-injection=enabledlabel applied and are still managed by OpenShift Service Mesh 2.6 control plane, do not use use thedefaultname for the Istio resource, and do not create thedefaultrevision tag in the following steps. You create thedefaultrevision tag later in this procedure.Apply the YAML file by running the following command:
oc apply -f ossm-3.yaml
$ oc apply -f ossm-3.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify that the new
istiodresource uses the existing root certificate by running the following command:oc logs deployments/istiod-ossm-3-v1-24-3 -n istio-system | grep 'Load signing key and cert from existing secret'
$ oc logs deployments/istiod-ossm-3-v1-24-3 -n istio-system | grep 'Load signing key and cert from existing secret'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
2024-12-18T08:13:53.788959Z info pkica Load signing key and cert from existing secret istio-system/istio-ca-secret
2024-12-18T08:13:53.788959Z info pkica Load signing key and cert from existing secret istio-system/istio-ca-secretCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.1.6.1. Migrating workloads by using the Istio injection label with cert-manager Copiar enlaceEnlace copiado en el portapapeles!
Now you can migrate your workloads from the OpenShift Service Mesh 2.6 control plane to the OpenShift Service Mesh 3.0 control plane.
You can migrate workloads and gateways separately, and in any order. For more information, see "Migrating gateways".
Procedure
Find the current
IstioRevisionresource for your OpenShift Service Mesh 3.0 control plane by running the following command:oc get istios
$ oc get istiosCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAME REVISIONS READY IN USE ACTIVE REVISION STATUS VERSION AGE ossm-3 1 1 0 ossm-3-v1-24-3 Healthy v1.24.3 30s
NAME REVISIONS READY IN USE ACTIVE REVISION STATUS VERSION AGE ossm-3 1 1 0 ossm-3-v1-24-3 Healthy v1.24.3 30sCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy the
ACTIVE REVISIONvalue to use as youristio.io/revlabel in the next step.NoteThe naming format of your revisions depends on which upgrade strategy you choose for your
Istioinstance.Update the injection labels on the data plane namespace by running the following command:
oc label ns bookinfo istio.io/rev=ossm-3-v1-24-3 maistra.io/ignore-namespace="true" istio-injection- --overwrite=true
$ oc label ns bookinfo istio.io/rev=ossm-3-v1-24-3 maistra.io/ignore-namespace="true" istio-injection- --overwrite=trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow The
oc labelcommand performs the following actions:-
Removes the
istio-injectionlabel: This label prevents the 3.0 control plane from injecting the proxy. Theistio-injectionlabel takes precedence over theistio.io/revlabel. You must temporarily remove theistio-injection=enabledbecause you cannot create the defaultIstioRevisionTagtag yet. Leaving theistio-injection=enabledlabel applied would prevent the 3.0 control plane from performing proxy injection. -
Adds the
istio.io/rev=ossm-3-v1-24-3label: This label ensures that any newly created or restarted pods in the namespace connect to the OpenShift Service Mesh 3.0 proxy. Adds the
maistra.io/ignore-namespace: "true"label: This label disables sidecar injection for OpenShift Service Mesh 2.6 proxies in the namespace. With the label applied, OpenShift Service Mesh 2.6 stops injecting proxies in this namespace, and any new proxies are injected by OpenShift Service Mesh 3.0. Without this label, the OpenShift Service Mesh 2.6 injection webhook tries to inject the pod and the injected sidecar proxy refuses to start since it will has both the OpenShift Service Mesh 2.6 and the OpenShift Service Mesh 3.0 Container Network Interface(CNI) annotations.NoteAfter you apply the
maistra.io/ignore-namespacelabel, any new pod that gets created in the namespace connects to the OpenShift Service Mesh 3.0 proxy. Workloads can still communicate with each other regardless of which control plane they are connected to.
-
Removes the
Restart the workloads by using one of the following options:
To restart all the workloads at the same time so that the new pods are injected with the OpenShift Service Mesh 3.0 proxy, run the following command:
Example command for
bookinfoapplicationoc rollout restart deployments -n bookinfo
$ oc rollout restart deployments -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow To restart each workload individually, run the following command for each workload:
Example command for
bookinfoapplicationoc rollout restart deployments productpage-v1 -n bookinfo
$ oc rollout restart deployments productpage-v1 -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Wait for the
productpageapplication to restart by running the following command:oc rollout status deployment productpage-v1 -n bookinfo
$ oc rollout status deployment productpage-v1 -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify that the the new control plane manages the expected workloads by running the following command:
istioctl ps -n bookinfo
$ istioctl ps -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The output shows that the
productpage-v1deployment is the only deployment that has been restarted and was injected with the 3.0 proxy. Even if there are different versions of the proxies, communication between the services still works.If the 2.6 installation contains additional namespaces, migrate the next namespace now.
NoteRemove the
maistra.io/ignore-namespace="true"label only after the 2.6 control plane has been uninstalled.
Next steps
If you are using gateways, you must migrate them before you complete the migration process.
If you are not using gateways, and have verified your cluster-wide migration, create a default revision tag and relabel namespaces.
Before creating a default revision tag and relabelling the namespaces, you must migrate all remaining workload namespaces, including gateways.
4.1.6.2. Creating the default revision tag and relabeling the namespaces with cert manager Copiar enlaceEnlace copiado en el portapapeles!
You can create the default revision tag and relabel the namespaces after you have completed the OpenShift Service Mesh 2 to OpenShift Service Mesh 3 cluster-wide migration process by using the Istio injection label.
The bookinfo application is used as an example.
Prerequisites
- You have completed the OpenShift Service Mesh 2 to OpenShift Service Mesh 3 cluster-wide migration process by using Istio injection label.
Procedure
Create a YAML file called
rev-tag.yamlthat defines theIstioRevisionTagresource:Example
IstioRevisionTagresourceCopy to Clipboard Copied! Toggle word wrap Toggle overflow Apply the YAML file by running the following command:
oc apply -f rev-tag.yaml
$ oc apply -f rev-tag.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify the status of the
IstioRevisionTagresource by running the following command:oc get istiorevisiontags
$ oc get istiorevisiontagsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NNAME STATUS IN USE REVISION AGE default NotReferencedByAnything False ossm-3-v1-24-3 18s
NNAME STATUS IN USE REVISION AGE default NotReferencedByAnything False ossm-3-v1-24-3 18sCopy to Clipboard Copied! Toggle word wrap Toggle overflow Add the
istio-injection=enabledlabel to thebookinfonamespace, and remove theistio.io/revlabel by running the following command:oc label ns bookinfo istio-injection=enabled istio.io/rev-
$ oc label ns bookinfo istio-injection=enabled istio.io/rev-Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteRemove the
maistra.io/ignore-namespace="true"label only after the 2.6 control plane has been uninstalled.Restart the workloads by running the following command:
oc rollout restart deployments -n bookinfo
$ oc rollout restart deployments -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteRepeat steps 4 and 5 for each namespace you are migrating.
Verification
Verify that the
IstioRevisionTagresource is in use by running the following command:oc get istiorevisiontags
$ oc get istiorevisiontagsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAME STATUS IN USE REVISION AGE default Healthy True ossm-3-v1-24-3 28s
NAME STATUS IN USE REVISION AGE default Healthy True ossm-3-v1-24-3 28sCopy to Clipboard Copied! Toggle word wrap Toggle overflow Ensure that expected workloads are managed by the new control plane by running the following command:
istioctl ps -n bookinfo
$ istioctl ps -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.1.7. Migrating a cluster-wide deployment by using the simple migration method Copiar enlaceEnlace copiado en el portapapeles!
You can perform a canary upgrade with the gradual migration of data plane namespaces for a cluster-wide deployment by using the simple migration method. In an OpenShift Service Mesh 2.6.9 installation, if the istio-injection=enabled label is already applied to the data plane namespaces, the simple migration method is the easiest way to migrate from the OpenShift Service Mesh 2 installation to the OpenShift Service Mesh 3 installation.
The simple migration method should not be used in production environments.
Using the simple migration method to migrate from OpenShift Service Mesh 2 to OpenShift Service Mesh 3 might result in traffic disruption to the services running on a mesh. There are two methods to perform the cluster-wide migration without disrupting traffic. See "Migrating a cluster-wide deployment by using the istio injection label" or "Migrating a cluster-wide deployment by using the Istio revision label" for more information.
The bookinfo application is used as an example for the Istio resource. For more information about configuration differences between the OpenShift Service Mesh 2 ServiceMeshControlPlane resource and the OpenShift Service Mesh 3 Istio resource, see "ServiceMeshControlPlane resource to Istio resource fields mapping."
Prerequisites
- You have deployed OpenShift Container Platform 4.14 or later.
-
You are logged in to the OpenShift Container Platform web console as a user with the
cluster-adminrole. - You have completed the premigration checklists.
- You have the OpenShift Service Mesh 2.6.9 Operator installed.
- You have the OpenShift Service Mesh 3 Operator installed.
-
You have created an
IstioCNIresource. -
You have installed the
istioctltool. - You are running a cluster-wide Service Mesh control plane resource.
-
You have installed the
bookinfoapplication.
Procedure
Identify the namespaces that contain a 2.6 control plane by running the following command:
oc get smcp -A
$ oc get smcp -ACopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAMESPACE NAME READY STATUS PROFILES VERSION AGE istio-system install-istio-system 6/6 ComponentsReady ["default"] 2.6.6 115m
NAMESPACE NAME READY STATUS PROFILES VERSION AGE istio-system install-istio-system 6/6 ComponentsReady ["default"] 2.6.6 115mCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a YAML file named
ossm-3.yaml. This procedure creates the Istio resource for the 3.0 installation in the same namespace as theServiceMeshControlPlaneresource for the 2.6 installation.NoteIn the following example configuration, the Istio control plane has access to all namespaces on the cluster. If you want to limit the namespaces the control plane has access to, you must define discovery selectors. You must match all the data plane namespaces that you plan to migrate from version 2.6.
Example
IstioresourceCopy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- The
name,updateStrategyandversionfields specify how theIstioRevisionresource name is created. For more information, see "Identifying the revision name." - 2
- The 3.0 and 2.6 control planes must run in the same namespace.
- 3
- If you are migrating metrics and tracing, update the
extensionProvidersfields according to your tracing and metrics configurations.
NoteIf the Istio resource is named
default, and the installation uses theInPlaceupdate strategy, you can use theistio-injection=enabledlabel without creating theIstioRevisionTagtag. If you use a different name for the Istio resource or you use theRevisionBasedupdate strategy, you must configure the defaultIstioRevisionTagtag. For more information, see "Creating the default revision tag and relabeling the namespaces."Apply the YAML file by running the following command:
oc apply -f ossm-3.yaml
$ oc apply -f ossm-3.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteAfter you apply the YAML file, any time the workloads are restarted, both the OpenShift Service Mesh 2.6 and the OpenShift Service Mesh 3.0 control planes will try to inject side cars to all pods in namespaces that have the
istio-injection=enabledlabel applied and to all pods that have thesidecar.istio.io/inject="true"label applied. This causes a traffic disruption. To prevent traffic disruption, restart the workloads only after themaistra.io/ignore-namespace: "true"label is added.
Verification
Verify that the new
istiodresource uses the existing root certificate by running the following command:oc logs deployments/istiod -n istio-system | grep 'Load signing key and cert from existing secret'
$ oc logs deployments/istiod -n istio-system | grep 'Load signing key and cert from existing secret'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
2024-12-18T08:13:53.788959Z info pkica Load signing key and cert from existing secret istio-system/istio-ca-secret
2024-12-18T08:13:53.788959Z info pkica Load signing key and cert from existing secret istio-system/istio-ca-secretCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.1.7.1. Migrating workloads by using the simple migration method Copiar enlaceEnlace copiado en el portapapeles!
After migrating a cluster-wide deployment, you can migrate your workloads from the OpenShift Service Mesh 2.6 control plane to the OpenShift Service Mesh 3.0 control plane.
You can migrate workloads and gateways separately, and in any order. For more information, see "Migrating gateways."
Procedure
Add the
maistra.io/ignore-namespace: "true"label to the data plane namespace by running the following command:oc label ns bookinfo maistra.io/ignore-namespace="true"
$ oc label ns bookinfo maistra.io/ignore-namespace="true"Copy to Clipboard Copied! Toggle word wrap Toggle overflow The
maistra.io/ignore-namespace: "true"label disables sidecar injection for OpenShift Service Mesh 2.6 proxies in the namespace. With the label applied, OpenShift Service Mesh 2.6 stops injecting proxies in this namespace, and any new proxies are injected by OpenShift Service Mesh 3.0. Without this label, the OpenShift Service Mesh 2.6 injection webhook tries to inject the pod and the injected sidecar proxy refuses to start since it has both the OpenShift Service Mesh 2.6 and the OpenShift Service Mesh 3.0 Container Network Interface(CNI) annotations.NoteAfter you apply the
maistra.io/ignore-namespacelabel, any new pod that gets created or restarted in the namespace connects to the OpenShift Service Mesh 3.0 proxy. Workloads can still communicate with each other regardless of which control plane they are connected to.Restart the workloads by using one of the following options:
To restart all the workloads at the same time so that the new pods are injected with the OpenShift Service Mesh 3.0 proxy, run the following command:
Example command for
bookinfoapplicationoc rollout restart deployments -n bookinfo
$ oc rollout restart deployments -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow To restart each workload individually, run the following command for each workload:
Example command for
bookinfoapplicationoc rollout restart deployments productpage-v1 -n bookinfo
$ oc rollout restart deployments productpage-v1 -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Wait for the
productpageapplication to restart by running the following command:oc rollout status deployment productpage-v1 -n bookinfo
$ oc rollout status deployment productpage-v1 -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify that the the new control plane manages the expected workloads by running the following command:
istioctl ps -n bookinfo
$ istioctl ps -n bookinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The output shows that the
productpage-v1deployment is the only deployment that has been restarted and was injected with the 3.0 proxy. Even if there are different versions of the proxies, communication between the services still works.If the 2.6 installation contains additional namespaces, migrate the next namespace now.
NoteRemove the
maistra.io/ignore-namespace="true"label only after the 2.6 control plane has been uninstalled.
Next steps
If you are using gateways, you must migrate them before you complete the migration process.
If you are not using gateways, you can complete your migration.