Added New VM and Load Balancer

This commit is contained in:
maximilian.bartz 2025-05-28 09:56:07 +02:00
parent d638ec4c45
commit 4fda3a9eff
3 changed files with 112 additions and 0 deletions

View file

@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: vm-datadisk
spec:
storageClassName: ibm-spectrum-scale-fileset
volumeMode: Block
accessModes:
- ReadWriteMany
resources:
requests:
storage: 400Gi

View file

@ -0,0 +1,29 @@
---
apiVersion: v1
kind: Service
metadata:
name: windows-lb
namespace: ${TENANT_NAMESPACE}
labels:
app.kubernetes.io/component: windows-vm-standard
spec:
type: LoadBalancer
ports:
- port: 8080
name: http
targetPort: 8080
protocol: TCP
- port: 443
name: https
targetPort: 443
protocol: TCP
- port: 65022
name: ssh
targetPort: 22
protocol: TCP
- port: 3389
name: rdp
targetPort: 3389
protocol: TCP
selector:
kubevirt.io/domain: windows-vm-standard

View file

@ -0,0 +1,71 @@
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
name: windows-vm-standard
namespace: ${TENANT_NAMESPACE}
spec:
dataVolumeTemplates:
- metadata:
name: windows-rootdisk
spec:
source:
http:
url: http://nginx.demo.svc.cluster.local:8080/windows-server-2022-uefi-ns.qcow2
storage:
resources:
requests:
storage: 30Gi
runStrategy: Always
template:
metadata:
labels:
kubevirt.io/domain: windows-vm-standard
spec:
domain:
cpu:
cores: 4
memory:
guest: 8Gi
devices:
rng: {}
networkInterfaceMultiqueue: true
interfaces:
- name: default
masquerade: {}
ports:
- port: 8080
- port: 443
- port: 22
- port: 3389
disks:
- disk:
bus: scsi
name: rootdisk
- disk:
bus: scsi
name: datadisk
- disk:
bus: scsi
name: cloudinitdisk
resources:
requests:
memory: 8Gi
cpu: 4
limits:
memory: 8Gi
cpu: 4
networks:
- name: default
pod: {}
terminationGracePeriodSeconds: 180
volumes:
- name: rootdisk
dataVolume:
name: windows-rootdisk
- name: datadisk
persistentVolumeClaim:
claimName: windows-datadisk
#- name: cloudinitdisk
# cloudInitNoCloud:
# secretRef:
# name: windows-cloud-init