In this video, learn the basics of Portworx and how it can enable your stateful…
July 12, 2023
Migrating Workloads to AKS using Portworx Enterprise
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).
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.
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.
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!