Chapter 6. Completing the migration
6.1. Completing the Migration Copy linkLink copied to clipboard!
Once the migration is complete, you can uninstall OpenShift Service Mesh 2.6.14 and optionally verify the migration status of data plane namespaces by using the Kiali Mesh page.
6.1.1. Migrating network policies after migrating deployment and workloads Copy linkLink copied to clipboard!
If you did not re-create your network policies before you migrated your deployment and workloads, you can re-create your network policies after migrating.
Prerequisites
- You have migrated your deployment.
- You have migrated your workloads.
Procedure
- Re-create necessary network policies in the new OpenShift Service Mesh 3 control plane namespace.
- Re-create network policies for each namespace that was part of the OpenShift Service Mesh 2 mesh.
Update labels.
Update corresponding network policy selectors to match the new labels.
NoteUse a label scoped specifically to your mesh that you can reuse for discovery selectors.
6.1.2. Completing a multitenant deployment with cert-manager Copy linkLink copied to clipboard!
Prerequisites
- You have migrated a multitenant deployment with the cert-manager and istio-csr tools.
Procedure
- Verify that your new injection label is present in all workload namespaces.
Update the
app.controller.configmapNamespaceSelectorfield by running the following command:helm upgrade cert-manager-istio-csr jetstack/cert-manager-istio-csr \ --install \ --reuse-values \ --namespace istio-system \ --wait \ --set "app.controller.configmapNamespaceSelector=tenant=tenant-a"
6.1.3. Remove the Service Mesh 2.6 control plane Copy linkLink copied to clipboard!
After you have migrated all your workloads and gateways, you can remove the OpenShift Service Mesh 2.x control plane.
Prerequisites
- You have completed migrating your workloads.
- You have completed migrating your gateways.
- You have logged in to the OpenShift Container Platform web console as a user with the cluster-admin role.
Depending on how you created ServiceMeshMember and ServiceMeshMemberRoll resources, those resources might be removed automatically with removal of the ServiceMeshControlPlane resource.
Procedure
Find all Service Mesh 2.6 resources by running the following command:
$ oc get smcp,smm,smmr -ARemove all
ServiceMeshControlPlaneresources by running the following command:$ oc delete smcp --all -ARemove all
ServiceMeshMemberRollresources by running the following command:$ oc delete smmr --all -ARemove all
ServiceMeshMemberresources by running the following command:$ oc delete smm --all -AVerify that all resources were removed by running the following command:
$ oc get smcp,smm,smmr -AExample output:
No resources found
6.1.4. Remove the Service Mesh 2.6 operator and custom resource definitions Copy linkLink copied to clipboard!
After you remove the Red Hat OpenShift Service Mesh 2 ServiceMeshControlplane resource, and all other OpenShift Service Mesh 2 resources, you can remove the OpenShift Service Mesh 2.6 Operator and custom resource definitions (CRDs).
Prerequisites
- You have completed migrating your workloads.
- You have completed migrating your gateways.
-
You have removed the OpenShift Service Mesh 2
ServiceMeshControlPlaneresource. - You have removed all other OpenShift Service Mesh 2 resources.
- You have logged in to the OpenShift Container Platform web console as a user with the cluster-admin role.
Procedure
Check that there are no Red Hat OpenShift Service Mesh 2.6 resources left by running the following command:
$ oc get smcp,smm,smmr -AExample output:
No resources foundRemove the Operator:
Find the Operator subscription by running the following command:
csv=$(oc get subscription servicemeshoperator -n openshift-operators -o yaml | grep currentCSV | cut -f 2 -d ':')Delete the subscription by running the following command:
$ oc delete subscription servicemeshoperator -n openshift-operatorsDelete the
clusterserviceversionCSV by running the following command:$ oc delete clusterserviceversion $csv -n openshift-operators
Remove
maistraCRDs by running the following command:$ oc get crds -o name | grep ".*\.maistra\.io" | xargs -r -n 1 oc delete
6.1.5. Remove the Maistra labels Copy linkLink copied to clipboard!
After you have removed all OpenShift Service Mesh 2 resources, removed the OpenShift Service Mesh 2 Operator, and OpenShift Service Mesh 2 custom resource definitions (CRDs), you can remove namespace labels created during the migration.
Prerequisites
- You have completed migrating your workloads.
- You have completed migrating your gateways.
-
You have removed the OpenShift Service Mesh 2
ServiceMeshControlPlaneresource. - You have removed all other OpenShift Service Mesh 2 resources.
- You have removed the OpenShift Service Mesh 2 Operator.
- You have removed the OpenShift Service Mesh 2 CRDs.
- You have logged in to the OpenShift Container Platform web console as a user with the cluster-admin role.
Procedure
Verify that all OpenShift Service Mesh 2.6 resources have been removed by running the following command:
$ oc get smcp,smm,smmr -AExample output:
No resources foundFind namespaces with the
maistra.io/ignore-namespace="true"label by running the following command:$ oc get namespace -l maistra.io/ignore-namespace="true"Example output:
NAME STATUS AGE bookinfo Active 127mRemove the label by running the following command:
$ oc label namespace bookinfo maistra.io/ignore-namespace-Example output:
namespace/bookinfo unlabeled