1
0

kubernetes.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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: DISK_SIZE
  36. value: "64G"
  37. ports:
  38. - containerPort: 8006
  39. name: http
  40. protocol: TCP
  41. - containerPort: 3389
  42. name: rdp
  43. protocol: TCP
  44. - containerPort: 3389
  45. name: udp
  46. protocol: UDP
  47. - containerPort: 5900
  48. name: vnc
  49. protocol: TCP
  50. securityContext:
  51. capabilities:
  52. add:
  53. - NET_ADMIN
  54. privileged: true
  55. volumeMounts:
  56. - mountPath: /storage
  57. name: storage
  58. - mountPath: /dev/kvm
  59. name: dev-kvm
  60. - mountPath: /dev/net/tun
  61. name: dev-tun
  62. terminationGracePeriodSeconds: 120
  63. volumes:
  64. - name: storage
  65. persistentVolumeClaim:
  66. claimName: windows-pvc
  67. - hostPath:
  68. path: /dev/kvm
  69. name: dev-kvm
  70. - hostPath:
  71. path: /dev/net/tun
  72. type: CharDevice
  73. name: dev-tun
  74. ---
  75. apiVersion: v1
  76. kind: Service
  77. metadata:
  78. name: windows
  79. spec:
  80. internalTrafficPolicy: Cluster
  81. ports:
  82. - name: http
  83. port: 8006
  84. protocol: TCP
  85. targetPort: 8006
  86. - name: rdp
  87. port: 3389
  88. protocol: TCP
  89. targetPort: 3389
  90. - name: udp
  91. port: 3389
  92. protocol: UDP
  93. targetPort: 3389
  94. - name: vnc
  95. port: 5900
  96. protocol: TCP
  97. targetPort: 5900
  98. selector:
  99. app: windows
  100. type: ClusterIP