This commit is contained in:
Tyler Perkins 2024-11-23 14:56:59 -05:00
parent 5fc6e705bb
commit 5208022354
Signed by: tyler
GPG Key ID: 03B27509E17EFDC8
4 changed files with 122 additions and 0 deletions

View File

@ -0,0 +1,51 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: plex
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: plex
template:
metadata:
labels:
app: plex
spec:
containers:
- name: plex
image: linuxserver/plex:latest
ports:
- containerPort: 32400
protocol: TCP # Plex web UI
- containerPort: 32410
protocol: UDP # DLNA discovery
- containerPort: 1900
protocol: UDP # DLNA
- containerPort: 32412
protocol: UDP # Plex DLNA additional
- containerPort: 32413
protocol: UDP # Plex DLNA additional
- containerPort: 32414
protocol: UDP # Plex DLNA additional
- containerPort: 3005
protocol: TCP # Plex companion
- containerPort: 8324
protocol: TCP # Plex GDM
- containerPort: 32469
protocol: TCP # DLNA
volumeMounts:
- mountPath: /media
name: plex-media
env:
- name: PUID
value: "1000" # Adjust based on your Plex user ID
- name: PGID
value: "1000" # Adjust based on your Plex group ID
- name: TZ
value: "America/New_York" # Adjust based on your timezone
volumes:
- name: plex-media
persistentVolumeClaim:
claimName: plex-media-pvc

View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: plex-media-pv
namespace: default
spec:
capacity:
storage: 8Ti
accessModes:
- ReadWriteMany
nfs:
path: /volume1/tank/media
server: 10.0.3.5

View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: plex-media-pvc
namespace: default
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
resources:
requests:
storage: 8Ti

View File

@ -0,0 +1,46 @@
apiVersion: v1
kind: Service
metadata:
name: plex
namespace: default
spec:
selector:
app: plex
ports:
- protocol: TCP
port: 32400
targetPort: 32400
name: plex-ui
- protocol: UDP
port: 32410
targetPort: 32410
name: dlna-discovery
- protocol: UDP
port: 1900
targetPort: 1900
name: dlna
- protocol: UDP
port: 32412
targetPort: 32412
name: plex-dlna-additional-1
- protocol: UDP
port: 32413
targetPort: 32413
name: plex-dlna-additional-2
- protocol: UDP
port: 32414
targetPort: 32414
name: plex-dlna-additional-3
- protocol: TCP
port: 3005
targetPort: 3005
name: plex-companion
- protocol: TCP
port: 8324
targetPort: 8324
name: plex-gdm
- protocol: TCP
port: 32469
targetPort: 32469
name: dlna-tcp
type: LoadBalancer