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