1
0

kubernetes.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. ---
  2. apiVersion: v1
  3. kind: PersistentVolumeClaim
  4. metadata:
  5. name: windows-pvc
  6. spec:
  7. accessModes:
  8. - ReadWriteOnce
  9. resources:
  10. requests:
  11. storage: 64Gi
  12. ---
  13. apiVersion: apps/v1
  14. kind: Deployment
  15. metadata:
  16. name: windows
  17. labels:
  18. name: windows
  19. spec:
  20. replicas: 1
  21. selector:
  22. matchLabels:
  23. app: windows
  24. template:
  25. metadata:
  26. labels:
  27. app: windows
  28. spec:
  29. containers:
  30. - name: windows
  31. image: dockurr/windows
  32. env:
  33. - name: VERSION
  34. value: "11"
  35. - name: RAM_SIZE
  36. value: "4G"
  37. - name: CPU_CORES
  38. value: "2"
  39. - name: DISK_SIZE
  40. value: "64G"
  41. ports:
  42. - containerPort: 8006
  43. name: http
  44. protocol: TCP
  45. - containerPort: 3389
  46. name: rdp
  47. protocol: TCP
  48. - containerPort: 3389
  49. name: udp
  50. protocol: UDP
  51. - containerPort: 5900
  52. name: vnc
  53. protocol: TCP
  54. securityContext:
  55. capabilities:
  56. add:
  57. - NET_ADMIN
  58. privileged: true
  59. volumeMounts:
  60. - mountPath: /storage
  61. name: storage
  62. - mountPath: /dev/kvm
  63. name: dev-kvm
  64. - mountPath: /dev/net/tun
  65. name: dev-tun
  66. terminationGracePeriodSeconds: 120
  67. volumes:
  68. - name: storage
  69. persistentVolumeClaim:
  70. claimName: windows-pvc
  71. - hostPath:
  72. path: /dev/kvm
  73. name: dev-kvm
  74. - hostPath:
  75. path: /dev/net/tun
  76. type: CharDevice
  77. name: dev-tun
  78. ---
  79. apiVersion: v1
  80. kind: Service
  81. metadata:
  82. name: windows
  83. spec:
  84. internalTrafficPolicy: Cluster
  85. ports:
  86. - name: http
  87. port: 8006
  88. protocol: TCP
  89. targetPort: 8006
  90. - name: rdp
  91. port: 3389
  92. protocol: TCP
  93. targetPort: 3389
  94. - name: udp
  95. port: 3389
  96. protocol: UDP
  97. targetPort: 3389
  98. - name: vnc
  99. port: 5900
  100. protocol: TCP
  101. targetPort: 5900
  102. selector:
  103. app: windows
  104. type: ClusterIP