Created
October 2, 2020 09:42
-
-
Save ams0/3f7e1303d76e72f5d7d1d10f1cce4e33 to your computer and use it in GitHub Desktop.
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
| kubectl apply -f - <<EOF | |
| apiVersion: kubevirt.io/v1alpha3 | |
| kind: VirtualMachine | |
| metadata: | |
| generation: 1 | |
| labels: | |
| kubevirt.io/os: windows | |
| 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: harddrive | |
| machine: | |
| type: q35 | |
| resources: | |
| requests: | |
| memory: 4096M | |
| volumes: | |
| - name: harddrive | |
| persistentVolumeClaim: | |
| claimName: winhd | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: vmrdp | |
| spec: | |
| externalTrafficPolicy: Cluster | |
| ports: | |
| - port: 3389 | |
| name: rdp | |
| protocol: TCP | |
| targetPort: 3389 | |
| selector: | |
| kubevirt.io/domain: vm1 | |
| type: LoadBalancer | |
| EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment