plex.yaml 2.2 KB

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