kubernetes deployment and clusterip

This commit is contained in:
Francois Liot 2025-03-06 23:23:31 +01:00
parent b8105e9072
commit 7893860d53

View file

@ -10,68 +10,81 @@ spec:
requests: requests:
storage: 64Gi storage: 64Gi
--- ---
apiVersion: v1 apiVersion: apps/v1
kind: Pod kind: Deployment
metadata: metadata:
name: windows name: windows
labels: labels:
name: windows name: windows
spec: spec:
containers: replicas: 1
- name: windows selector:
image: dockurr/windows matchLabels:
env: app: windows
- name: VERSION template:
value: "11" metadata:
- name: RAM_SIZE labels:
value: "4G" app: windows
- name: CPU_CORES spec:
value: "2" containers:
- name: DISK_SIZE - name: windows
value: "64G" image: dockurr/windows
ports: env:
- containerPort: 8006 - name: VERSION
- containerPort: 3389 value: "11"
- containerPort: 3389 - name: RAM_SIZE
protocol: UDP value: "4G"
securityContext: - name: CPU_CORES
capabilities: value: "2"
add: - name: DISK_SIZE
- NET_ADMIN value: "64G"
privileged: true ports:
volumeMounts: - containerPort: 8006
- mountPath: /storage name: http
name: storage protocol: TCP
- mountPath: /dev/kvm - containerPort: 3389
name: dev-kvm name: rdp
- mountPath: /dev/net/tun protocol: TCP
name: dev-tun securityContext:
terminationGracePeriodSeconds: 120 capabilities:
volumes: add:
- name: storage - NET_ADMIN
persistentVolumeClaim: privileged: true
claimName: windows-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: windows-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: windows name: windows
spec: spec:
internalTrafficPolicy: Cluster
ports: ports:
- name: tcp-8006 - name: http
port: 8006 port: 8006
- name: tcp-3389 protocol: TCP
port: 3389 targetPort: 8006
- name: udp-3389 - name: rdp
port: 3389 port: 3389
protocol: UDP protocol: TCP
targetPort: 3389
selector: selector:
name: windows app: windows
type: NodePort type: ClusterIP