jellyfin.yaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. ---
  2. apiVersion: v1
  3. kind: Namespace
  4. metadata:
  5. name: plex
  6. ---
  7. apiVersion: apps/v1
  8. kind: Deployment
  9. metadata:
  10. name: jellyfin
  11. namespace: plex
  12. spec:
  13. strategy:
  14. type: Recreate
  15. selector:
  16. matchLabels:
  17. app: jellyfin
  18. replicas: 1
  19. template:
  20. metadata:
  21. labels:
  22. app: jellyfin
  23. annotations:
  24. backup.velero.io/backup-volumes-excludes: media,tmpfs
  25. spec:
  26. containers:
  27. - name: jellyfin
  28. image: jellyfin/jellyfin:latest
  29. imagePullPolicy: Always
  30. ports:
  31. - containerPort: 8096
  32. name: http-web-svc
  33. volumeMounts:
  34. - mountPath: "/config"
  35. name: config
  36. - mountPath: "/media"
  37. name: media
  38. - mountPath: "/transcodes"
  39. name: tmpfs
  40. # Quicksync
  41. - name: "render-device"
  42. mountPath: "/dev/dri/renderD128"
  43. env:
  44. - name: PUID
  45. value: "1000"
  46. - name: PGID
  47. value: "1000"
  48. - name: "MALLOC_TRIM_THRESHOLD_"
  49. value: "131072"
  50. ## NVIDIA
  51. #- name: NVIDIA_DRIVER_CAPABILITIES
  52. # value: "all"
  53. # Quicksync
  54. securityContext:
  55. privileged: true
  56. livenessProbe:
  57. httpGet:
  58. path: /web/index.html
  59. port: 8096
  60. failureThreshold: 5
  61. initialDelaySeconds: 10
  62. periodSeconds: 30
  63. timeoutSeconds: 10
  64. ## NVIDIA
  65. #resources:
  66. # limits:
  67. # nvidia.com/gpu: 1
  68. resources:
  69. requests:
  70. memory: "0"
  71. limits:
  72. memory: "2Gi"
  73. affinity:
  74. nodeAffinity:
  75. requiredDuringSchedulingIgnoredDuringExecution:
  76. nodeSelectorTerms:
  77. - matchExpressions:
  78. - key: gpu-node
  79. operator: In
  80. values:
  81. - "true"
  82. volumes:
  83. - name: config
  84. persistentVolumeClaim:
  85. claimName: jellyfin-config-pvc
  86. - name: media
  87. persistentVolumeClaim:
  88. claimName: media2-pvc
  89. - name: tmpfs
  90. emptyDir:
  91. medium: Memory
  92. sizeLimit: 2Gi
  93. # Quicksync
  94. - name: "render-device"
  95. hostPath:
  96. path: "/dev/dri/renderD128"
  97. ---
  98. apiVersion: v1
  99. kind: Service
  100. metadata:
  101. name: jellyfin-service
  102. namespace: plex
  103. spec:
  104. selector:
  105. app: jellyfin
  106. type: ClusterIP
  107. ports:
  108. - name: jellyfin-web-port
  109. protocol: TCP
  110. port: 8096
  111. targetPort: http-web-svc
  112. ---
  113. apiVersion: networking.k8s.io/v1
  114. kind: Ingress
  115. metadata:
  116. name: jellyfin
  117. namespace: plex
  118. annotations:
  119. traefik.ingress.kubernetes.io/router.entrypoints: websecure
  120. spec:
  121. rules:
  122. - host: jellyfin.jibby.org
  123. http:
  124. paths:
  125. - path: /
  126. pathType: Prefix
  127. backend:
  128. service:
  129. name: jellyfin-service
  130. port:
  131. number: 8096