apiVersion: v1 kind: Service metadata: name: plex namespace: pvr spec: ports: - protocol: TCP name: web port: 32400 selector: app: plex --- apiVersion: apps/v1 kind: Deployment metadata: name: plex namespace: pvr labels: app: plex spec: replicas: 1 selector: matchLabels: app: plex strategy: type: Recreate template: metadata: labels: app: plex spec: hostNetwork: true containers: - name: plex image: bv11-cr01.bessems.eu/proxy/linuxserver/plex ports: - name: web containerPort: 32400 env: - name: VERSION value: latest volumeMounts: - mountPath: /config name: longhorn-plex-config - mountPath: /preroll name: flexvolsmb-plex-preroll - mountPath: /data/series name: flexvolsmb-pvr-series - mountPath: /data/songs name: flexvolsmb-pvr-songs - mountPath: /data/movies name: flexvolsmb-pvr-movies - mountPath: /transcode name: emptydir-plex-transcode volumes: - name: longhorn-plex-config persistentVolumeClaim: claimName: longhorn-plex-config - name: flexvolsmb-plex-preroll persistentVolumeClaim: claimName: flexvolsmb-plex-preroll - name: flexvolsmb-pvr-series persistentVolumeClaim: claimName: flexvolsmb-pvr-series - name: flexvolsmb-pvr-songs persistentVolumeClaim: claimName: flexvolsmb-pvr-songs - name: flexvolsmb-pvr-movies persistentVolumeClaim: claimName: flexvolsmb-pvr-movies - name: emptydir-plex-transcode emptyDir: # medium: Memory --- apiVersion: traefik.containo.us/v1alpha1 kind: IngressRoute metadata: name: plex namespace: pvr spec: entryPoints: - websecure routes: - match: Host(`media.pvr.spamasaurus.com`) kind: Rule services: - name: plex port: 32400 middlewares: - name: security-headers@file - name: compression@file tls: options: name: defaults@file certResolver: default domains: - main: '*.pvr.spamasaurus.com' sans: - 'pvr.spamasaurus.com' --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: longhorn-plex-config namespace: pvr spec: accessModes: - ReadWriteOnce storageClassName: longhorn resources: requests: storage: 5Gi --- apiVersion: v1 kind: PersistentVolume metadata: name: flexvolsmb-plex-preroll namespace: pvr spec: capacity: storage: 1Gi accessModes: - ReadWriteMany storageClassName: flexvolsmb-plex-preroll flexVolume: driver: mount/smb secretRef: name: smb-secret options: opts: domain=bessems.eu,file_mode=0777,dir_mode=0777,iocharset=utf8,cache=none server: 192.168.11.225 share: /K3s.Volumes/plex/preroll --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: flexvolsmb-plex-preroll namespace: pvr spec: accessModes: - ReadWriteMany storageClassName: flexvolsmb-plex-preroll resources: requests: storage: 1Gi