-
Notifications
You must be signed in to change notification settings - Fork 23
/
kubevirt.debug.vm.yaml
73 lines (73 loc) · 1.82 KB
/
kubevirt.debug.vm.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
#namespace: default
labels:
kubevirt.io/vm: vm-ubuntu-debug
name: vm-ubuntu-debug
spec:
dataVolumeTemplates:
- metadata:
creationTimestamp: null
name: vm-ubuntu-debug
spec:
pvc:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
#storageClassName: kubermatic-vm-disk
source:
http:
#url: http://vm-image-registry.kube-system.svc/vms/ubuntu-22.04-server-cloudimg-amd64.img
#latest cloudimg
url: https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img
running: true
template:
metadata:
labels:
kubevirt.io/vm: vm-ubuntu-debug
spec:
dnsConfig:
nameservers:
- 8.8.8.8
dnsPolicy: None
domain:
devices:
disks:
- disk:
bus: virtio
name: datavolumedisk
- disk:
bus: virtio
name: cloudinitdisk
# interfaces:
# - macAddress: 12:78:03:8b:95:d7
# name: default
# machine:
# type: q35
# networks:
# - name: default
resources:
requests:
memory: "8Gi"
cpu: "2"
limits:
memory: "8Gi"
cpu: "2"
terminationGracePeriodSeconds: 30
volumes:
- dataVolume:
name: vm-ubuntu-debug
name: datavolumedisk
- cloudInitNoCloud:
userData: |
#!/bin/sh
uname -a
mkdir -p /root/.ssh
cat << EOF >> /root/.ssh/authorized_keys
#### TODO ADD YOUR SSH PUBLIC KEY EOF
echo 'ssh key added ...'
cat /root/.ssh/authorized_keys
name: cloudinitdisk