plex.yaml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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.26.2.5797-5bd057d2b
  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. livenessProbe:
  43. httpGet:
  44. path: /web/index.html
  45. port: 32400
  46. failureThreshold: 5
  47. initialDelaySeconds: 10
  48. periodSeconds: 30
  49. timeoutSeconds: 10
  50. resources:
  51. limits:
  52. nvidia.com/gpu: 1
  53. volumes:
  54. - name: config
  55. persistentVolumeClaim:
  56. claimName: plex-config-pvc
  57. - name: media-metadata
  58. persistentVolumeClaim:
  59. claimName: plex-media-metadata-pvc
  60. - name: media
  61. persistentVolumeClaim:
  62. claimName: plex-media-pvc
  63. - name: tmpfs
  64. emptyDir:
  65. medium: Memory
  66. sizeLimit: 12Gi
  67. ---
  68. apiVersion: v1
  69. kind: Service
  70. metadata:
  71. name: plex-service
  72. namespace: plex
  73. spec:
  74. selector:
  75. app: plex
  76. type: ClusterIP
  77. ports:
  78. - name: plex-web-port
  79. protocol: TCP
  80. port: 32400
  81. targetPort: http-web-svc
  82. ---
  83. apiVersion: traefik.containo.us/v1alpha1
  84. kind: IngressRoute
  85. metadata:
  86. name: plex
  87. namespace: plex
  88. spec:
  89. entryPoints:
  90. - websecure
  91. routes:
  92. - kind: Rule
  93. match: Host(`plex.jibby.org`)
  94. services:
  95. - kind: Service
  96. name: plex-service
  97. port: 32400