docs: Kubernetes deployment

This commit is contained in:
Kroese 2025-03-07 00:03:49 +01:00 committed by GitHub
parent bfc8d7a9c6
commit 8e9b8be977
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,58 +10,72 @@ spec:
requests: requests:
storage: 16Gi storage: 16Gi
--- ---
apiVersion: v1 apiVersion: apps/v1
kind: Pod kind: Deployment
metadata: metadata:
name: dsm name: dsm
labels: labels:
name: dsm name: dsm
spec: spec:
containers: replicas: 1
- name: dsm selector:
image: vdsm/virtual-dsm matchLabels:
env: app: dsm
- name: RAM_SIZE template:
value: "1G" metadata:
- name: CPU_CORES labels:
value: "1" app: dsm
- name: DISK_SIZE spec:
value: "16G" containers:
ports: - name: dsm
- containerPort: 5000 image: vdsm/virtual-dsm
securityContext: env:
capabilities: - name: RAM_SIZE
add: value: "1G"
- NET_ADMIN - name: CPU_CORES
privileged: true value: "1"
volumeMounts: - name: DISK_SIZE
- mountPath: /storage value: "16G"
name: storage ports:
- mountPath: /dev/kvm - containerPort: 5000
name: dev-kvm name: http
- mountPath: /dev/net/tun protocol: TCP
name: dev-tun securityContext:
terminationGracePeriodSeconds: 120 capabilities:
volumes: add:
- name: storage - NET_ADMIN
persistentVolumeClaim: privileged: true
claimName: dsm-pvc volumeMounts:
- hostPath: - mountPath: /storage
path: /dev/kvm name: storage
name: dev-kvm - mountPath: /dev/kvm
- hostPath: name: dev-kvm
path: /dev/net/tun - mountPath: /dev/net/tun
type: CharDevice name: dev-tun
name: dev-tun terminationGracePeriodSeconds: 120
volumes:
- name: storage
persistentVolumeClaim:
claimName: dsm-pvc
- hostPath:
path: /dev/kvm
name: dev-kvm
- hostPath:
path: /dev/net/tun
type: CharDevice
name: dev-tun
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: dsm name: dsm
spec: spec:
internalTrafficPolicy: Cluster
ports: ports:
- name: tcp-5000 - name: http
port: 5000 port: 5000
protocol: TCP
targetPort: 5000
selector: selector:
name: dsm app: dsm
type: NodePort type: ClusterIP