docs: Add TUN device

This commit is contained in:
Kroese 2024-12-01 16:54:18 +01:00 committed by GitHub
parent 8b351446d9
commit 593d0fa12b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,10 +1,11 @@
---
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
name: windows-pvc name: windows-pvc
spec: spec:
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
resources: resources:
requests: requests:
storage: 64Gi storage: 64Gi
@ -16,68 +17,61 @@ metadata:
labels: labels:
name: windows name: windows
spec: spec:
terminationGracePeriodSeconds: 120 # the Kubernetes default is 30 seconds and it may be not enough
containers: containers:
- name: windows - name: windows
image: dockurr/windows image: dockurr/windows
ports: env:
- containerPort: 8006 - name: VERSION
protocol: TCP value: "11"
- containerPort: 3389 - name: RAM_SIZE
protocol: TCP value: "4G"
- containerPort: 3389 - name: CPU_CORES
protocol: UDP value: "2"
securityContext: - name: DISK_SIZE
capabilities: value: "64G"
add: ports:
- NET_ADMIN - containerPort: 8006
privileged: true - containerPort: 3389
env: - containerPort: 3389
- name: VERSION protocol: UDP
value: "11" securityContext:
- name: RAM_SIZE capabilities:
value: "4G" add:
- name: CPU_CORES - NET_ADMIN
value: "2" privileged: true
- name: DISK_SIZE volumeMounts:
value: "64G" - mountPath: /storage
volumeMounts: name: storage
- mountPath: /storage - mountPath: /dev/kvm
name: storage name: dev-kvm
- mountPath: /dev/kvm - mountPath: /dev/net/tun
name: dev-kvm name: dev-tun
- mountPath: /dev/net/tun terminationGracePeriodSeconds: 120
name: dev-tun
volumes: volumes:
- name: storage - name: storage
persistentVolumeClaim: persistentVolumeClaim:
claimName: windows-pvc claimName: windows-pvc
- name: dev-kvm - hostPath:
hostPath: path: /dev/kvm
path: /dev/kvm name: dev-kvm
- name: dev-tun - hostPath:
hostPath: path: /dev/net/tun
path: /dev/net/tun type: CharDevice
type: CharDevice name: dev-tun
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: windows name: windows
spec: spec:
type: NodePort ports:
- name: tcp-8006
port: 8006
- name: tcp-3389
port: 3389
- name: udp-3389
port: 3389
protocol: UDP
selector: selector:
name: windows name: windows
ports: type: NodePort
- name: tcp-8006
protocol: TCP
port: 8006
targetPort: 8006
- name: tcp-3389
protocol: TCP
port: 3389
targetPort: 3389
- name: udp-3389
protocol: UDP
port: 3389
targetPort: 3389