How to Easily Migrate Your OpenShift Apps to the Cloud

If you run containerized apps in OpenShift, you know that Red Hat makes building and managing Kubernetes applications simpler. That’s the case, no matter where you deploy those applications—on-prem, in the public or hybrid cloud, or at the edge.

But regardless of your infrastructure, there might be times when you need more availability, want to switch your cloud, or are looking for operational help via a managed service. There’s just one problem: Migrating your OpenShift applications across cloud infrastructure isn’t easy.

Thankfully, you have options. Below, we break down the challenges of moving cloud-native applications, how Trilio makes this process seamless, and an example that shows just how easy OpenShift migration can be.

OpenShift Migration Challenges Across the Cloud

While the benefits of running applications in the cloud are vast, there are still challenges with things like security, observability, and compliance. Another challenge? The ability to migrate across clouds, especially as your organization grows.

For example, you might decide to switch from OpenShift on-prem to a public cloud to take advantage of on-demand elasticity. Depending on how you deploy your apps, this process can cost you time, money, and performance. If done incorrectly, it could even result in downtime or data loss.

Here’s how:

  • Time: Moving your OpenShift apps to different infrastructure can be time consuming, especially if you’re unable to move all of their components. If you can’t migrate your application metadata and other associated objects, you’ll lose data or have to manually reconstruct your application in your new environment.
  • 💰 Cost: If you’re currently running your OpenShift apps on the cloud, beware of the cost of switching clouds. Cloud providers don’t make it cheap to swap, introducing the dreaded vendor lock-in.
  • ⚠️ Performance: Your apps might not work the same in one cloud vs. another or on-prem vs. a public cloud, requiring you to re-architect them. That can result in performance issues ranging from speed to availability.

While the cloud migration process is tricky, it’s not impossible. It just requires you to have the right tools in place. But what are they?

Cloud-Native Migration for OpenShift Apps

With the rise of cloud-native applications, there’s also been a rise of platforms that help solve the challenges of the cloud. These solutions make it easy to migrate entire workloads across infrastructure with ease and speed, reducing the costly implications on your business.

Looking to move your OpenShift applications across the cloud? Here are some things you need in a solution.

Comprehensive protection: Look for a platform that protects your entire application. This includes both what your application consists of (data, metadata, and all associated objects) and how you manage it (by Helm, Operators, Labels, or Namespaces).

Infrastructure agnostic: Migrating your OpenShift apps across infrastructure with ease depends on the capabilities of your tool. Choose one that can work with any cloud or storage, so you can select the vendors that fit your cost, security, and performance needs.

Red Hat certified: Don’t trust just anyone with your OpenShift migration needs. Instead, find a platform that’s certified with Red Hat and natively integrated and optimized for OpenShift. That way, compatibility is never a problem and management is easy.

TrilioVault for Kubernetes (TVK) offers all of these features and more, and it’s specifically designed to support OpenShift in any environment. For example, AWS and Microsoft both vetted TVK, so you can migrate between OpenShift and the public cloud.

Want to see it in action? Let’s take a look at how easy OpenShift migration is by moving an application from on-prem to Red Hat OpenShift Service on AWS (ROSA) using TrilioVault for Kubernetes.

How to Migrate from OpenShift On-Prem to OpenShift on AWS with TVK

With TrilioVault for Kubernetes, you can migrate OpenShift on-prem to ROSA easily. Here are step-by-step instructions for migrating a MySQL Helm application from an on-prem OpenShift (OCP) cluster to a ROSA cluster running on the AWS cloud.

Before you get started:

  1. Install the latest version of TrilioVault for Kubernetes (2.10.5) into your OCP and ROSA clusters.
  2. Ensure that your OCP and ROSA clusters have access to the same Target repository where the backup files will be stored by TVK.
  3. Be able to access the Web UI for both OCP and ROSA clusters.
  4. Install the Container Storage Interface (CSI) driver, which has volume snapshot capability, on both clusters.

1: Access TVK from the OCP cluster and login into the TVK Management Console

red hat openshift ui on triliovault for kubernetes operator

  • Log in to OCP user interface (UI) and navigate to the Installation TVK operator.
  • Under the Networking section, go to routes and find the k8s-triliovault-web route. Then, copy the URL under the Location column to access TVK’s UI.
  • Open the URL in a new browser tab to access the TVK UI login page.
  • Log in to TVK using kubeconfig or using your OpenShift credentials. Click on Sign-in via the OpenShift option to login into TVK’s UI.

2: Use TVK to Autodiscover Your Namespace and Application

backup and recovery helm and operator on triliovault for kubernetes ui

  • Once you login, you can see the TVK instance name and Cluster Provider name with status. You can only see the license expiration date after you apply your TVK license number.
  • Click on the Backup and Recovery option on the left panel to go into auto-discovered namespaces.
  • On the left side panel, click on Applications to see the cluster’s auto-discovered objects.
  • Select the namespace from the dropdown at the top to view the object only for the MySQL application that you installed previously.
  • Go to the second tab “Helm & Operator” to view the Helm release “mysql-qa” that is deployed through a Helm chart.
  • Now, you can back up the Helm application.

3: Back Up Your Application on the Demo-Backup Namespace on the OpenShift Cluster

create new backup plan tvk | Easy OpenShift migration to AWS using TrilioVault for Kubernetes

  • Click on “Create Backup” on the right for the mysql-qa application name. This will show a pop-up window to provide one-time details of the backupplan.
  • If there’s no backupplan created for this application, click “Create New” on the top right corner of the pop-up window.
  • Follow the steps in this doc to create a target before creating a backupplan.
  • Then, provide the Namespace, Backupplan Name, and Target name as mandatory parameters and Encryption secret, Hook Configuration, Scheduling Policies, and Retention policies as optional parameters. Click next. Check out this doc to learn more about the options related to backupplan.
  • On the next screen, click on the Helm Release tab to verify that the “mysql-qa” Helm release will be captured as part of the backup.
  • Click “Create” to create the backupplan and then click “Finish.”
  • Once you successfully create the backupplan, it will be visible and automatically selected on the backup pop-up windows.
  • Click “Next” to provide the backup name.
  • Click “Create” to start the backup operation. As the backup process starts, it will also show the status log on the same pop-up window.
  • When the process is complete, the backup will be marked as successful. Click “Finish” to close the popup window.

status log tvk openshift migration to rosa | Easy OpenShift migration to AWS using TrilioVault for Kubernetes

  • Select “Backup Plans” in the left panel to view the Backupplan you created.
  • Click on the downward arrow next to the “Edit” button and select the “View Backup and Restore Summary” option. A new Monitoring pop-up window will show the status of the backup.
  • You can also go to the “Monitoring” page by first clicking the backward arrow on the top left corner next to “Backup & Recovery” and then selecting “Monitoring” on the left side panel.
  • The backup of the MySQL application Helm release is complete now.

4: Migrate Your Red Hat OpenShift Application to ROSA Running on AWS

  • To migrate, make sure that you’ve installed TVK through the OperatorHub on the ROSA cluster.
  • Then, launch the TVK UI following the same steps as OCP and log in to TVK using Kubeconfig or the “Sign In Via OpenShift” option.
  • Go to the “Backup & Recovery” option and select “Namespace” from the top dropdown where the MySQL application is to be restored.
  • The new target will be created in the same namespace where the application is located.
  • Then, create the same AWS S3 or NFS target that you’ve used to store the backup on the OCP cluster. Here are instructions.

target demo aws s3 | Easy OpenShift migration to AWS using TrilioVault for Kubernetes

  • Enable the “Browsing” option on the target since you need it to browse the earlier backup stored on the target to be used to perform the restore.
  • Once the Browsing status is shown as “Enabled,” click on the download arrow option “Launch Browser”.
  • Select the “Backup Plan Name” with the “Backup Plan Type“ as “Helm” or search for the Backup Plan name.

target browser tvk instance backup plan | Easy OpenShift migration to AWS using TrilioVault for Kubernetes

  • Click on the Backup plan name, which will open a pop-up window that shows the backups associated with the backup plan.
  • Click on “Restore” to start the process to perform a restore, which will open a pop-up. Provide the Restore name and select the restore namespace from the dropdown where you want to restore the MySQL Helm application.
  • Click on “Next” to see different options of “Transform Components”, “Exclude Resources”, and “Hook Configuration.” You can use these options as needed during the restore operation. Find more details about the restore workflow in this document.
  • Click on “Create” to start the restore process.
  • Once the restore operation completes, you can click “Finish.”
  • Close the “Backups” pop-up window and the “Target Browser” window.
  • Go back to the “TrilioVault Monitoring” page to see the “Backup Summary” and “Restore Summary”.
  • Click on the “Details” button in the “Restore Summary” to view details of all the restores that you’ve performed from the Target Browser.
  • Congrats! You’ve completed the restore operation of the MySQL Helm application on the ROSA cluster successfully from the backup taken on the on-prem OCP cluster.

5: Validate the Restore

mysql ya demo backup application | Easy OpenShift migration to AWS using TrilioVault for Kubernetes

  • Once the restore is complete and checked on the Monitoring page, you can go to the “Backup & Recovery” page and select the “Applications” option to view all auto-discovered label-based objects present on the ROSA cluster.
  • Now, select the namespace where you’ve restored the MySQL Helm application and select the second tab “Helm & Operator” to view the MySQL Helm chart.
  • Since TVK restored the Helm chart as a Helm chart, the MySQL release name will be changed during the restore.

Want to migrate an application on ROSA to EKS or OpenShift on-prem to AWS? Simply follow the same process.

OpenShift Migration: Break the Barriers of the Cloud

Make sure your OpenShift applications are easily movable to any environment, and unlock a world of opportunity for your organization—from greater elasticity to reduced cloud costs.

So where will your OpenShift applications go, and more importantly, what will they do for your business when they get there?

Learn more about the ease of OpenShift migration with TrilioVault for Kubernetes.