jellyfin.yaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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,transcodes
  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: transcodes
  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. # Quicksync
  49. securityContext:
  50. privileged: true
  51. livenessProbe:
  52. httpGet:
  53. path: /web/index.html
  54. port: 8096
  55. failureThreshold: 5
  56. initialDelaySeconds: 10
  57. periodSeconds: 30
  58. timeoutSeconds: 10
  59. resources:
  60. requests:
  61. memory: "0"
  62. limits:
  63. memory: "1.5Gi"
  64. limits:
  65. ephemeral-storage: "1Gi"
  66. affinity:
  67. nodeAffinity:
  68. requiredDuringSchedulingIgnoredDuringExecution:
  69. nodeSelectorTerms:
  70. - matchExpressions:
  71. - key: gpu-node
  72. operator: In
  73. values:
  74. - "true"
  75. volumes:
  76. - name: config
  77. persistentVolumeClaim:
  78. claimName: jellyfin-config-pvc
  79. - name: media
  80. persistentVolumeClaim:
  81. claimName: media2-pvc
  82. - name: transcodes
  83. emptyDir: {}
  84. # Quicksync
  85. - name: "render-device"
  86. hostPath:
  87. path: "/dev/dri/renderD128"
  88. ---
  89. apiVersion: v1
  90. kind: Service
  91. metadata:
  92. name: jellyfin-service
  93. namespace: plex
  94. spec:
  95. selector:
  96. app: jellyfin
  97. type: ClusterIP
  98. ports:
  99. - name: jellyfin-web-port
  100. protocol: TCP
  101. port: 8096
  102. targetPort: http-web-svc
  103. ---
  104. apiVersion: networking.k8s.io/v1
  105. kind: Ingress
  106. metadata:
  107. name: jellyfin
  108. namespace: plex
  109. annotations:
  110. traefik.ingress.kubernetes.io/router.entrypoints: websecure
  111. spec:
  112. rules:
  113. - host: jellyfin.jibby.org
  114. http:
  115. paths:
  116. - path: /
  117. pathType: Prefix
  118. backend:
  119. service:
  120. name: jellyfin-service
  121. port:
  122. number: 8096