Skip to content

Instantly share code, notes, and snippets.

@ams0
Last active September 20, 2020 23:27
Show Gist options
  • Select an option

  • Save ams0/e05a969440054c40333e45506e51e3ee to your computer and use it in GitHub Desktop.

Select an option

Save ams0/e05a969440054c40333e45506e51e3ee to your computer and use it in GitHub Desktop.
kubectl apply -f - <<EOF
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachine
metadata:
generation: 1
labels:
kubevirt.io/os: linux
name: vm1
spec:
running: true
template:
metadata:
labels:
kubevirt.io/domain: vm1
spec:
nodeSelector: #nodeSelector matches nodes where performance key has high as value.
nested: "true"
domain:
cpu:
cores: 2
devices:
disks:
- disk:
bus: virtio
name: disk0
- cdrom:
bus: sata
readonly: true
name: cloudinitdisk
machine:
type: q35
resources:
requests:
memory: 1024M
volumes:
- name: disk0
containerDisk:
image: kubevirt/fedora-cloud-container-disk-demo:v0.33.0
- name: cloudinitdisk
cloudInitNoCloud:
secretRef:
name: vm1-cloudconfig
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment