KubeVirt
Kubernetes 클러스터 내에서 가상 머신(VM)을 컨테이너처럼 실행할 수 있게 해주는 확장 프로젝트
KubeVirt란?
KubeVirt는 Kubernetes 클러스터 내에서 가상 머신(VM)을 컨테이너처럼 실행할 수 있게 해주는 확장 프로젝트이다.
기존의 VM 기반 워크로드를 클라우드 네이티브 환경(Kubernetes)과 통합해 운영할 수 있도록 돕는다.
KubeVirt vs Docker / Kubernetes
항목 | KubeVirt | Kubernetes | Docker |
---|---|---|---|
핵심 대상 | 가상 머신(VM) | 컨테이너 | 컨테이너 |
역할 | Kubernetes 위에서 VM 운영 | 컨테이너 오케스트레이션 | 컨테이너 엔진 |
주요 사용 사례 | 레거시 VM 운영 통합 | MSA, 클라우드 네이티브 | 로컬 개발 및 단일 컨테이너 실행 |
어떤 환경에서 사용할까?
- 기존 VM 기반 애플리케이션을 Kubernetes 환경에서 운영하고 싶을 때
- 레거시 인프라와 클라우드 네이티브를 병행해서 운영해야 할 때
- VM → 컨테이너로의 마이그레이션 과도기
개념 사용법 (간단 예시)
- KubeVirt 설치 (예: Minikube 환경)
1 2 3
minikube start kubectl create -f https://github.com/kubevirt/kubevirt/releases/latest/download/kubevirt-operator.yaml kubectl create -f https://github.com/kubevirt/kubevirt/releases/latest/download/kubevirt-cr.yaml
- VM 정의 예시 ```yaml apiVersion: kubevirt.io/v1 kind: VirtualMachine metadata: name: test-vm spec: running: true template: spec: domain: devices: disks: - disk: bus: virtio name: containerdisk resources: requests: memory: 1024M volumes:
- name: containerdisk containerDisk: image: kubevirt/cirros-container-disk-demo terminationGracePeriodSeconds: 0 ```
- VM 실행
1
kubectl apply -f vm.yaml
참고 링크
- 공식 사이트: https://kubevirt.io/
- GitHub: https://github.com/kubevirt/kubevirt
This post is licensed under CC BY 4.0 by the author.