diff --git a/Jellyfin/README.md b/Jellyfin/README.md index e69de29..6ea3371 100644 --- a/Jellyfin/README.md +++ b/Jellyfin/README.md @@ -0,0 +1,7 @@ +# Jellyfin +Jellyfin is a media center server somewhat like netflix but self-hosted. + +## Using this kubernetes config +In `deployment.yml`, set the media directory host path. This is where you will/have put your media for Jellyfin to serve. + +In `ingress.yml`, set the hostname that users will use to connect to the service. This config assumes you have cert-manager installed on your cluster, so if you want to provide HTTPS another way, feel free to comment out the `spec.tls` section (the annotation shouldn't affect anything, but you can comment it out as well if you want) \ No newline at end of file diff --git a/Jellyfin/deployment.yml b/Jellyfin/deployment.yml new file mode 100644 index 0000000..634a4e7 --- /dev/null +++ b/Jellyfin/deployment.yml @@ -0,0 +1,50 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: jellyfin +spec: + replicas: 1 + selector: + matchLabels: + app: jellyfin + template: + metadata: + labels: + app: jellyfin + spec: + containers: + - name: jellyfin + image: jellyfin/jellyfin:latest + ports: + - containerPort: 8096 + resources: + requests: + cpu: "500m" + memory: "256Mi" + limits: + cpu: "2" + memory: "2Gi" + volumeMounts: + - name: config + mountPath: /config + - name: media + mountPath: /media + volumes: + - name: config + persistentVolumeClaim: + claimName: jellyfin-config-pvc + - name: media + hostPath: + path: + type: Directory +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: jellyfin-config-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 128Mi diff --git a/Jellyfin/ingress.yml b/Jellyfin/ingress.yml new file mode 100644 index 0000000..db5c0d6 --- /dev/null +++ b/Jellyfin/ingress.yml @@ -0,0 +1,22 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: jellyfin-ingress + annotations: + cert-manager.io/cluster-issuer: "letsencrypt-production" +spec: + tls: + - hosts: + - + secretName: jellyfin-tls + rules: + - host: + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: jellyfin + port: + number: 80 diff --git a/Jellyfin/service.yml b/Jellyfin/service.yml new file mode 100644 index 0000000..b059bcd --- /dev/null +++ b/Jellyfin/service.yml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: jellyfin +spec: + selector: + app: jellyfin + ports: + - protocol: TCP + port: 80 + targetPort: 8096