apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: plex
  name: plex
spec:
  replicas: 1
  selector:
    matchLabels:
      app: plex
  template:
    metadata:
      labels:
        app: plex
    spec:
      containers:
      - name: plex
        image: plexinc/pms-docker:plexpass
        ports:
        - containerPort: 32400
        - containerPort: 3005
        - containerPort: 8324
        - containerPort: 32469
        - containerPort: 1900
          protocol: UDP
        - containerPort: 32410
          protocol: UDP
        - containerPort: 32412
          protocol: UDP
        - containerPort: 32413
          protocol: UDP
        - containerPort: 32414
          protocol: UDP
        env:
        - name: ALLOWED_NETWORKS
          value: 192.168.0.0/16,172.16.0.0/12,10.0.0.0/18
        - name: PLEX_GID
          value: "1001"
        - name: PLEX_UID
          value: "1001"
        - name: TZ
          value: '"Africa/Johannaesburg"'
        volumeMounts:
        - mountPath: /red
          name: red
        - mountPath: /config
          name: config
        - mountPath: /transcode
          name: transcode
      volumes:
      - name: red
        hostPath:
          path: /red
      - name: config
        hostPath:
          path: /home/docker/plex/config
      - name: transcode
        hostPath:
          path: /home/docker/plex/transcode
status: {}
