关于使用kubevirt创建VMI期间的容器创建

我将docker与kubernetes结合使用。 #kubectl,#Kubevirt

当我从docker.io注册表中使用containerDisk创建VMI时,我发现在单个pod中创建了两个容器(一个是计算容器,另一个是volumecontainervolume)

cat centos.yaml | grep -ia3 centos-kubevirt-image

 volumes:

  - name: containervolume

  containerDisk:

    image: munnaeeebd/centos-kubevirt-image:latest

 - name: cloudinitvolume

  cloudInitNoCloud:

    userData: |-

kubectl获取广告连播| grep centos

virt-launcher-centos-5kfvw 2/2 运行0 21h

但是使用PVC和disk.img创建单个容器是通过CDI上传的

cat cirros-with-cirros-pvc.yaml | grep -ia3 cirros-pvc

  volumes:

   - name: containervolume

     persistentVolumeclaim:

     claimName: cirros-pvc

   - name: cloudinitvolume

     cloudInitNoCloud:

    userData: |-

kubectl获取广告连播| grep cirros

virt-launcher-cirros-57x2r 1/1 运行0 78m

我的问题是,containerDisk比PVC创建一个额外的容器是否正常

c139261 回答:关于使用kubevirt创建VMI期间的容器创建

this GitHub post中所述,这是设计行为。

  

计算容器包含运行Virtual的QEMU进程   机。虚拟机从已安装的设备读取机器映像   从另一个volumecontainer服务的卷。

     

第二个容器   仅提供数据。

     

通过这种设计,您可以受益于打包虚拟机   在容器映像中,并将其上传到任何容器注册表。   上传后,KubeVirt可以将其用作容器磁盘。

本文链接:https://www.f2er.com/3133534.html

大家都在问