Migrate virtual machines to Kubernetes with this new tool

Transition your virtualized workloads to Kubernetes with Forklift.
57 readers like this.
How Kubernetes is helping Docker blossom

Maersk Line. CC SA-BY 4.0

In 2017, the KubeVirt team launched the project to manage virtual machines (VMs) alongside containers in Kubernetes. The open source project's intent was to make VMs first-class citizens in this environment.

Since its introduction at Open Source Summit 2018, KubeVirt has continued maturing and growing. It's reached more than 2,000 stars on GitHub and even introduced its own event, KubeVirt Summit, in February 2021.

KubeVirt architecture

Making virtualization Kubernetes-native (© Red Hat)

KubeVirt is the foundation underneath OpenShift Virtualization, which helps developers bring VMs into containerized workflows.

Leveraging VMs in Kubernetes

KubeVirt enables you to use Kubernetes natives on VMs. This means they can connect to pod networks that are accessible using standard Kubernetes methods, including Service, Route, Pipelines, etc. Network policies apply to VM pods the same way they apply to application pods, providing a consistent model to manage VM-to-pod (and vice-versa) communication.

A real-world example of this is the way an aeronautical company leveraged old simulator software. It injected models with artificial intelligence and machine learning (AI/ML), then automatically deployed and tested them on a VM-based simulator. This allowed it to fully automate obtaining test results and new telemetry training data using Kubernetes and Kubeflow.

Konveyor.io is an open source project that helps transition existing workloads (development, test, and production) to Kubernetes. Its tools include Crane, to move containers from one Kubernetes platform to another; Move2Kube, to bring workloads from Cloud Foundry to Kubernetes; and Tackle, to analyze Java applications to modernize them by making them more standard and portable for the runtimes available in containerized platforms like Kubernetes.

These tools are useful in transformation patterns, but many projects want to utilize Kubernetes at earlier stages to become more agile and productive. On the infrastructure side, these benefits can include blue/green load balancing, route management, declarative deployments, or (depending on how you deploy) easier upgrades due to immutable infrastructure. On the development side, they may include integrating continuous integration/continuous development (CI/CD) pipelines with the platform, getting apps to production faster, self-provisioning resources, or integrating health checks and monitoring.

KubeVirt can help you by running workloads as VMs in a Kubernetes environment. It enables you to onboard your workloads to Kubernetes quickly, enjoy its benefits, and steadily modernize your workloads over time. But, you still have the issue of bringing your VMs from your traditional virtualization platform to the modern Kubernetes platform. This is where Konveyor's Forklift project comes in.

About Forklift

Forklift migrates virtualized workloads from different sources to Kubernetes using KubeVirt. It is designed to make the task simple so that you can migrate anything from one or two machines to hundreds of them.

Migration is a simple, three-stage process:

  1. Connect to an existing virtualization platform (known as a "source provider") and to a Kubernetes environment (a "target provider").
  2. Map network and storage resources from the source provider to the target provider, looking for equivalent resources in both.
  3. Select virtual machines to migrate and assign the network and storage mappings to formulate a migration plan. Then run it.

How to get started

To get started with Forklift, first, you need a compatible source provider. You also need a Kubernetes environment with KubeVirt 0.40 or newer and bare-metal nodes (although for testing, you can use nested virtualization). Configure your storage classes with read-write-execute (RWX) capabilities, and use Multus to configure your networks to match the ones your VMs are using in the source provider. (If you can't do this, no worries; you also have the option to rearrange IP addressing.)

Finally, install Forklift on your Kubernetes using the provided operator, and access the user interface to start running your first test migrations.

Forklift is the upstream version of Red Hat's Migration Toolkit for Virtualization. Therefore, if you want to use it in a production environment, you may wish to consider using that supported version of the tool.

Happy migrating!

What to read next
Miguel Pérez Colino
Miguel is an experienced IT enthusiast with a clear orientation towards open source software & open standards. He has an extensive background in IT, from operations to architecture of large deployments; from identifying and prototyping solutions to defining IT strategies.

Comments are closed.

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.