Статьи

Запуск виртуальных машин KVM и VMware в контейнерном движке для Kubernetes

With the advent of microservices, people commonly ask, «Is it possible to run my legacy virtual machines in Kernel-based Virtual Machine (KVM) or VMware with my microservices on Kubernetes, or do I need to migrate them to containers?» One possible answer to that question is KubeVirt.

The KubeVirt project turns Kubernetes into an orchestration engine for application containers and VM workloads. It addresses the needs of development teams that have adopted or want to adopt Kubernetes but have existing VM-based workloads that they can’t easily put in containers. The technology provides a unified development platform in which developers can build, modify, and deploy applications that reside in both application containers and VMs in a common, shared environment.

Note: KubeVirt can be tested on external cloud providers like Oracle Cloud Infrastructure, but this setup is not meant for production yet!

Getting Started

Oracle Cloud Infrastructure Container Engine for Kubernetes (sometimes referred to as OKE) provides a reliable and scalable integrated workflow platform to build, test, deploy, and monitor your code in the cloud. Container Engine for Kubernetes helps you deploy, manage, and scale Kubernetes clusters in the cloud. With it, you can build dynamic containerized applications by incorporating Kubernetes with services running on Oracle Cloud Infrastructure.

KubeVirt can be deployed on Container Engine for Kubernetes worker nodes with bare metal or VM shapes. If your cluster worker nodes are provisioned with VM shapes, KubeVirt runs your legacy KVM or VMware VMs in nested mode.

Requirements

The Oracle Cloud Infrastructure command line interface (CLI) and the Container Engine for Kubernetes kubectl CLI must be installed and configured. For more information, see the Container Engine for Kubernetes documentation. You can also use Cloud Shell, a browser-based terminal accessible from the Oracle Cloud Infrastructure Console. The CLIs are preinstalled and configured in Cloud Shell.

Deployment

Follow these steps to deploy KubeVirt with Container Engine for Kubernetes.

Step 1: Deploy the KubeVirt Operator

  1. Run the Container Engine for Kubernetes cluster and NodePool nodes.

  2. Set the version environment variable to be used on commands:

    Shell