Skip to content

Instantly share code, notes, and snippets.

@fabiand
Created July 11, 2023 11:00
Show Gist options
  • Save fabiand/df1a89891a9f8102ef5b157e15fddb90 to your computer and use it in GitHub Desktop.
Save fabiand/df1a89891a9f8102ef5b157e15fddb90 to your computer and use it in GitHub Desktop.
- hosts: localhost
tasks:
- name: Create VM
kubernetes.kubevirt.kubevirt_vm:
state: present
name: testvm
namespace: default
labels:
app: test
spec:
instancetype:
name: u1.medium
preference: # Optional?
name: fedora
devices:
interfaces:
- name: default
masquerade: {}
- name: bridge-network
bridge: {}
networks:
- name: default
pod: {}
- name: bridge-network
multus:
networkName: kindexgw
volumes:
- containerDisk:
image: quay.io/containerdisks/fedora:latest
name: containerdisk
- cloudInitNoCloud:
userData: |-
#cloud-config
# The default username is: fedora
ssh_authorized_keys:
- ssh-ed25519 AAAA...
name: cloudinit
wait: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment