Este contenido no está disponible en el idioma seleccionado.

Chapter 5. Migrating gateways


5.1. Migrating gateways

If you are using gateways with Red Hat OpenShift Service Mesh 2.6.9 and migrating them to OpenShift Service Mesh 3.0, you can migrate gateways from OpenShift Service Mesh 2 to OpenShift Service Mesh 3 just like regular workloads.

Use one of the following two methods for migrating gateways from Red Hat OpenShift Service Mesh 2 to OpenShift Service Mesh 3:

  • Gateway canary migration
  • Gateway in place migration

5.1.1. Gateway canary migration

Use the gateway canary migration method when you want a gradual rollout. It uses multiple gateway versions with maximum control over your gateway rollout.

Note

The label for the gateway namespace differs between mulitenant and cluster-wide meshes. To understand which labels to use in your specific migration case and the maistra.io/ignore-namespace: "true" label requirement, see the "Multitenant migration guide" or the "Cluster-wide migration guide" section.

Procedure

  1. Run the following command to label the gateway namespace to ensure that gateway injection is enabled from the new mesh and add the maistra.io/ignore-namespace: "true" label:

    $ oc label namespace <gateway_namespace> istio.io/rev=<istio_revision_name> maistra.io/ignore-namespace="true"
    Copy to Clipboard Toggle word wrap
    1. Remove the istio-injection=enabled label, if needed.
  2. Deploy a canary gateway by using the following example:

    Example YAML for canary gateway

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: istio-ingressgateway-canary
      namespace: istio-ingress 
    1
    
    spec:
       selector:
         matchLabels:
           istio: ingressgateway 
    2
    
       template:
         metadata:
           annotations:
             inject.istio.io/templates: gateway
           labels:
             istio: ingressgateway
             istio.io/rev: canary 
    3
    
         spec:
           containers:
           - name: istio-proxy
             image: auto
    Copy to Clipboard Toggle word wrap

    1
    Your Deployment resource must be in in the same namespace as your existing gateway.
    2
    Your spec.selector.matchlabels.istio parameter must match your existing gateway service selector.
    3
    Set your OpenShift Service Mesh 3.0 control plane revision as the value of the istio.io/rev label.
  3. Ensure that the new gateway deployment is running with the new revision and is handling requests:

    1. Check that pods are running and in the Ready status.
    2. Check that the gateway is running the new revision by running the following command:

      $ istioctl ps -n istio-ingress
      Copy to Clipboard Toggle word wrap
    3. Test a sample route through the gateway.
  4. Gradually shift traffic between deployments:

    1. Increase replicas for new gateway by running the following command:

      $ oc scale -n istio-ingress deployment/<new_gateway_deployment> --replicas <new_number_of_replicas>
      Copy to Clipboard Toggle word wrap
    2. Decrease replicas for old gateway by running the following command:

      $ oc scale -n istio-ingress deployment/<old_gateway_deployment> --replicas <new_number_of_replicas>
      Copy to Clipboard Toggle word wrap
    3. Repeat this process, incrementally adjusting replica counts until the new gateway handles all traffic to the gateway Service.

5.1.2. Gateway in place migration

If you need less detailed control over your gateway migration, you can perform gateway in place migration. This method applies to namespaces with dedicated gateways and to environments using a centralized gateway shared across multiple namespaces.

Note

The label for the gateway namespace differs between mulitenant and cluster-wide meshes. To understand which labels to use in your specific migration case and the maistra.io/ignore-namespace: "true" label requirement, see the "Multitenant migration guide" or the "Cluster-wide migration guide" section.

Procedure

  1. Run the following command to label the gateway namespace to ensure that gateway injection is enabled from the new mesh and add the maistra.io/ignore-namespace: "true" label:

    $ oc label namespace <gateway_namespace> istio.io/rev=<istio_revision_name> maistra.io/ignore-namespace="true"
    Copy to Clipboard Toggle word wrap
    1. Remove the istio-injection=enabled label, if needed.
  2. Restart the gateway deployment by running the following command:

    $ oc -n ${app_namespace} rollout restart deployment ${gateway_name}
    Copy to Clipboard Toggle word wrap

Verification

  1. Check that the gateway is running the new revision by running the following command:

    $ istioctl ps -n istio-ingress
    Copy to Clipboard Toggle word wrap
  2. Test application-specific routes.
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat