Created
July 10, 2025 09:41
-
-
Save oshoval/a59e44aad08c280392adb078bba353a0 to your computer and use it in GitHub Desktop.
Deploy VMs with passt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| name: blue-ns | |
| labels: | |
| k8s.ovn.org/primary-user-defined-network: "" | |
| --- | |
| apiVersion: k8s.cni.cncf.io/v1 | |
| kind: NetworkAttachmentDefinition | |
| metadata: | |
| name: access-tenant-blue | |
| namespace: blue-ns | |
| spec: | |
| config: |2 | |
| { | |
| "cniVersion": "0.3.0", | |
| "name": "tenantblue", | |
| "type": "ovn-k8s-cni-overlay", | |
| "topology":"layer2", | |
| "subnets": "10.100.0.0/16", | |
| "mtu": 1400, | |
| "netAttachDefName": "blue-ns/access-tenant-blue", | |
| "role": "primary" | |
| } | |
| --- | |
| apiVersion: kubevirt.io/v1 | |
| kind: VirtualMachine | |
| metadata: | |
| name: vm-a | |
| namespace: blue-ns | |
| spec: | |
| running: true | |
| template: | |
| spec: | |
| domain: | |
| devices: | |
| disks: | |
| - disk: | |
| bus: virtio | |
| name: containerdisk | |
| - disk: | |
| bus: virtio | |
| name: cloudinitdisk | |
| interfaces: | |
| - name: passtnet | |
| binding: | |
| name: passt | |
| rng: {} | |
| resources: | |
| requests: | |
| memory: 2048M | |
| networks: | |
| - name: passtnet | |
| pod: {} | |
| terminationGracePeriodSeconds: 0 | |
| volumes: | |
| - containerDisk: | |
| image: quay.io/kubevirt/fedora-with-test-tooling-container-disk:v1.1.0 | |
| name: containerdisk | |
| - cloudInitNoCloud: | |
| networkData: | | |
| version: 2 | |
| ethernets: | |
| eth0: | |
| dhcp4: true | |
| name: cloudinitdisk | |
| --- | |
| apiVersion: kubevirt.io/v1 | |
| kind: VirtualMachine | |
| metadata: | |
| name: vm-b | |
| namespace: blue-ns | |
| spec: | |
| running: true | |
| template: | |
| spec: | |
| domain: | |
| devices: | |
| disks: | |
| - disk: | |
| bus: virtio | |
| name: containerdisk | |
| - disk: | |
| bus: virtio | |
| name: cloudinitdisk | |
| interfaces: | |
| - name: passtnet | |
| binding: | |
| name: passt | |
| rng: {} | |
| resources: | |
| requests: | |
| memory: 2048M | |
| networks: | |
| - name: passtnet | |
| pod: {} | |
| terminationGracePeriodSeconds: 0 | |
| volumes: | |
| - containerDisk: | |
| image: quay.io/kubevirt/fedora-with-test-tooling-container-disk:v1.1.0 | |
| name: containerdisk | |
| - cloudInitNoCloud: | |
| networkData: | | |
| version: 2 | |
| ethernets: | |
| eth0: | |
| dhcp4: true | |
| name: cloudinitdisk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment