kubernetes部署Jellyfin媒体服务器

  sre


git:https://github.com/jellyfin/jellyfin
官网:https://jellyfin.org/

pvc

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: jellyfin-config
  namespace: test
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: nfs
  resources:
    requests:
      storage: 10Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: media
  namespace: test
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: nfs
  resources:
    requests:
      storage: 1500Gi


Deployment jellyfin

apiVersion: apps/v1
kind: Deployment
metadata:
  name: jellyfin
  namespace: test
spec:
  selector:
    matchLabels:
      app: jellyfin
  template:
    metadata:
      labels:
        app: jellyfin
    spec:
      containers:
      - env:
        - name: NODE_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: spec.nodeName
        - name: POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        image: jellyfin/jellyfin
        imagePullPolicy: IfNotPresent
        name: jellyfin
        ports:
        - containerPort: 8096
          protocol: TCP
        volumeMounts:
        - mountPath: /data/media
          name: media
          readOnly: True
        - mountPath: /config
          name: jellyfin-config
      restartPolicy: Always
      volumes:
      - name: media
        persistentVolumeClaim:
          claimName: media
      - name: jellyfin-config
        persistentVolumeClaim:
          claimName: jellyfin-config

svc

apiVersion: v1
kind: Service
metadata:
  labels:
    app: jellyfin
  name: jellyfin
  namespace: test
spec:
  ports:
  - name: web
    port: 8096
    protocol: TCP
    targetPort: 8096
    nodePort: 30046
  selector:
    app: jellyfin
  type: NodePort

web

http://172.16.0.21:30046

LEAVE A COMMENT

Captcha Code