plex.yaml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. ---
  2. apiVersion: v1
  3. kind: Namespace
  4. metadata:
  5. name: plex
  6. ---
  7. apiVersion: apps/v1
  8. kind: Deployment
  9. metadata:
  10. name: plex
  11. namespace: plex
  12. spec:
  13. selector:
  14. matchLabels:
  15. app: plex
  16. replicas: 1
  17. template:
  18. metadata:
  19. labels:
  20. app: plex
  21. spec:
  22. containers:
  23. - name: plex
  24. image: linuxserver/plex:amd64-version-1.30.2.6563-3d4dc0cce
  25. ports:
  26. - containerPort: 32400
  27. name: http-web-svc
  28. volumeMounts:
  29. - mountPath: "/config"
  30. name: config
  31. - mountPath: "/config/Library/Application Support/Plex Media Server/Media"
  32. name: media-metadata
  33. - mountPath: "/media"
  34. name: media
  35. - mountPath: "/transcodes"
  36. name: tmpfs
  37. env:
  38. - name: PUID
  39. value: "1000"
  40. - name: PGID
  41. value: "1000"
  42. - name: NVIDIA_DRIVER_CAPABILITIES
  43. value: "all"
  44. livenessProbe:
  45. httpGet:
  46. path: /web/index.html
  47. port: 32400
  48. failureThreshold: 5
  49. initialDelaySeconds: 10
  50. periodSeconds: 30
  51. timeoutSeconds: 10
  52. resources:
  53. limits:
  54. nvidia.com/gpu: 1
  55. volumes:
  56. - name: config
  57. persistentVolumeClaim:
  58. claimName: plex-config-pvc
  59. - name: media-metadata
  60. persistentVolumeClaim:
  61. claimName: plex-metadata-pvc
  62. - name: media
  63. persistentVolumeClaim:
  64. claimName: plex-pvc
  65. - name: tmpfs
  66. emptyDir:
  67. medium: Memory
  68. sizeLimit: 12Gi
  69. ---
  70. apiVersion: v1
  71. kind: Service
  72. metadata:
  73. name: plex-service
  74. namespace: plex
  75. spec:
  76. selector:
  77. app: plex
  78. type: ClusterIP
  79. ports:
  80. - name: plex-web-port
  81. protocol: TCP
  82. port: 32400
  83. targetPort: http-web-svc
  84. ---
  85. apiVersion: traefik.containo.us/v1alpha1
  86. kind: IngressRoute
  87. metadata:
  88. name: plex
  89. namespace: plex
  90. spec:
  91. entryPoints:
  92. - websecure
  93. routes:
  94. - kind: Rule
  95. match: Host(`plex.jibby.org`)
  96. services:
  97. - kind: Service
  98. name: plex-service
  99. port: 32400