plex.yaml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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.32.2.7100-248a2daf0
  25. # for debugging
  26. # command: ["/bin/sh"]
  27. # args: ["-c", "sleep 3600"]
  28. ports:
  29. - containerPort: 32400
  30. name: http-web-svc
  31. volumeMounts:
  32. - mountPath: "/config"
  33. name: config
  34. - mountPath: "/config/Library/Application Support/Plex Media Server/Media"
  35. name: media-metadata
  36. - mountPath: "/media"
  37. name: media
  38. - mountPath: "/transcodes"
  39. name: tmpfs
  40. env:
  41. - name: PUID
  42. value: "1000"
  43. - name: PGID
  44. value: "1000"
  45. - name: NVIDIA_DRIVER_CAPABILITIES
  46. value: "all"
  47. livenessProbe:
  48. httpGet:
  49. path: /web/index.html
  50. port: 32400
  51. failureThreshold: 5
  52. initialDelaySeconds: 10
  53. periodSeconds: 30
  54. timeoutSeconds: 10
  55. resources:
  56. limits:
  57. nvidia.com/gpu: 1
  58. volumes:
  59. - name: config
  60. persistentVolumeClaim:
  61. claimName: plex-config-pvc
  62. - name: media-metadata
  63. persistentVolumeClaim:
  64. claimName: plex-metadata-pvc
  65. - name: media
  66. persistentVolumeClaim:
  67. claimName: plex-pvc
  68. readOnly: true
  69. - name: tmpfs
  70. emptyDir:
  71. medium: Memory
  72. sizeLimit: 12Gi
  73. ---
  74. apiVersion: v1
  75. kind: Service
  76. metadata:
  77. name: plex-service
  78. namespace: plex
  79. spec:
  80. selector:
  81. app: plex
  82. type: ClusterIP
  83. ports:
  84. - name: plex-web-port
  85. protocol: TCP
  86. port: 32400
  87. targetPort: http-web-svc
  88. ---
  89. apiVersion: traefik.containo.us/v1alpha1
  90. kind: IngressRoute
  91. metadata:
  92. name: plex
  93. namespace: plex
  94. spec:
  95. entryPoints:
  96. - websecure
  97. routes:
  98. - kind: Rule
  99. match: Host(`plex.jibby.org`)
  100. services:
  101. - kind: Service
  102. name: plex-service
  103. port: 32400