jellyfin.yaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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:10.9.8
  29. ports:
  30. - containerPort: 8096
  31. name: http-web-svc
  32. volumeMounts:
  33. - mountPath: "/config"
  34. name: config
  35. - mountPath: "/media"
  36. name: media
  37. - mountPath: "/transcodes"
  38. name: tmpfs
  39. # Quicksync
  40. - name: "render-device"
  41. mountPath: "/dev/dri/renderD128"
  42. env:
  43. - name: PUID
  44. value: "1000"
  45. - name: PGID
  46. value: "1000"
  47. ## NVIDIA
  48. #- name: NVIDIA_DRIVER_CAPABILITIES
  49. # value: "all"
  50. # Quicksync
  51. securityContext:
  52. privileged: true
  53. livenessProbe:
  54. httpGet:
  55. path: /web/index.html
  56. port: 8096
  57. failureThreshold: 5
  58. initialDelaySeconds: 10
  59. periodSeconds: 30
  60. timeoutSeconds: 10
  61. ## NVIDIA
  62. #resources:
  63. # limits:
  64. # nvidia.com/gpu: 1
  65. affinity:
  66. nodeAffinity:
  67. requiredDuringSchedulingIgnoredDuringExecution:
  68. nodeSelectorTerms:
  69. - matchExpressions:
  70. - key: gpu-node
  71. operator: In
  72. values:
  73. - "true"
  74. volumes:
  75. - name: config
  76. persistentVolumeClaim:
  77. claimName: jellyfin-config-pvc
  78. - name: media
  79. persistentVolumeClaim:
  80. claimName: media2-pvc
  81. - name: tmpfs
  82. emptyDir:
  83. medium: Memory
  84. sizeLimit: 6Gi
  85. # Quicksync
  86. - name: "render-device"
  87. hostPath:
  88. path: "/dev/dri/renderD128"
  89. ---
  90. apiVersion: v1
  91. kind: Service
  92. metadata:
  93. name: jellyfin-service
  94. namespace: plex
  95. spec:
  96. selector:
  97. app: jellyfin
  98. type: ClusterIP
  99. ports:
  100. - name: jellyfin-web-port
  101. protocol: TCP
  102. port: 8096
  103. targetPort: http-web-svc
  104. ---
  105. apiVersion: networking.k8s.io/v1
  106. kind: Ingress
  107. metadata:
  108. name: jellyfin
  109. namespace: plex
  110. annotations:
  111. traefik.ingress.kubernetes.io/router.entrypoints: websecure
  112. spec:
  113. rules:
  114. - host: jellyfin.jibby.org
  115. http:
  116. paths:
  117. - path: /
  118. pathType: Prefix
  119. backend:
  120. service:
  121. name: jellyfin-service
  122. port:
  123. number: 8096