apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
name: my-vm001
spec:
running: true
template:
metadata:
labels:
kubevirt.io/vm: my-vm001
spec:
# 在master03节点上调度
nodeSelector:
kubernetes.io/hostname: master03
domain:
devices:
disks:
- name: my-disk001
disk:
bus: virtio
resources:
requests:
memory: 1G
volumes:
- name: my-disk001
persistentVolumeClaim:
claimName: test-kubevirt001
创建
kubectl apply -f vm001.yaml
文档更新时间: 2023-03-26 06:06 作者:admin