Portworx & Red Hat Hands-on Labs Register Now

In today’s world, businesses are constantly looking for ways to improve their infrastructure, and one such way is by migrating their applications to the cloud. In this blog post, we’ll walk through the process of migrating a WordPress namespace from an on-prem RKE 2 cluster to Azure using Portworx. Portworx is a cloud-native storage and data management solution for Kubernetes, and it plays a crucial role in this migration process.

In this video, I migrate my wife’s website from my home lab into Azure AKS (hopefully without her realizing).

Preparation

Before we dive into the migration process, let’s go through the preparation steps. First, we created a cluster pair for the Azure environment. This cluster pair object contains the necessary information to connect to the Kubernetes API and an Azure storage account, which is used for data movement.

In this example, we’re going to migrate a WordPress website that is currently running on an on-prem RKE 2 cluster. Portworx is used to serve the application, and we can see the data volumes and replica sets in the Kubernetes dashboard.

Migration Process

To kick off the migration, we’ll create a new object using the storage orchestrator. This object is defined in a YAML file, which contains the migration configuration. In this example, we’re migrating the “hhk” namespace.

apiVersion: stork.libopenstorage.org/v1alpha1
kind: Migration
metadata:
  name: migrate01
  namespace: portworx
spec:
  clusterPair: cluster02
  includeResources: true
  startApplications: true
  namespaces:
    - hhk
  purgeDeletedResources: false

 

To apply the migration configuration, we’ll run the following command:

kubectl apply -f migration.yaml

Once the migration is complete, we’ll need to update the DNS to point to the new Azure environment. This may take a few moments to propagate.

To verify the migration was successful, we can delete the website from the local RKE 2 cluster and check the Azure environment. In the Azure Kubernetes environment, we can see the new namespace and that the deployments and replica sets are running.

Conclusion

Migrating a namespace that contains PVCs generally isn’t possible, but by using the libopenstorage stork CRD and Portworx storage, we’re able to do it with a single manifest. This process is a great example of the value Portworx brings to the table in migrating applications and data to the cloud. In the future, we’ll explore more advanced migration and disaster recovery scenarios using Portworx. Stay tuned for more exciting demos and tutorials!

Share
Subscribe for Updates

About Us
Portworx is the leader in cloud native storage for containers.

chris

Chris Crow

Chris is a Cloud Native Architect supporting Portworx customers in the Pacific Northwest
Explore Related Content:
  • azure
  • clusterpair
  • migration
  • RKE
link
Portworx101
January 7, 2020 Lightboard
Lightboard Session: Portworx 101
Ryan Wallner
Ryan Wallner
link
image
May 29, 2020 Lightboard
Portworx Essentials vs Portworx Enterprise
Ryan Wallner
Ryan Wallner
link
Screen-Shot
February 16, 2022 Customers
Announcing GA of Portworx Enterprise 2.9 release - Modernize your Pure FlashArray/FlashBlade Infrastructure
Surbhi Paul
Surbhi Paul