munnerz/kube-plex

Networking - Remove vs Local

Closed this issue · 2 comments

Fantastic helm chart thanks! I think this is just my confusion with networking in Kubernetes, but I am having issues with Plex distinguishing between local and remote traffic with my Plex installation using this helm chart. Plex seems to always see traffic as coming from my virbr0 ip of 192.168.1.122/24 whether it is coming from a port forward on the router, or going to Plex from TVs on the local lan.

I have the following settings:

  1. My local lan is on subnet 192.168.2.0/24
  2. The docker/kubernetes host has ip of 192.168.2.6/24
  3. On my docker host I have virbr0 and it is set to ip 192.168.1.122/24
  4. I am trying to use NodePort to expose port 32400 so that local TVs can do direct play.
  5. I then start this helm deployment with the following settings, and I copy in the additional environment settings after manually listed at the bottom, and I add 192.168.1.0/24, and 192.168.2.0/24 as a local network in the Plex settings "LAN Networks":
image:
  tag: latest

kubePlex:
  enabled: false

service:
  type: NodePort
  port: 32400
  nodePort: 32400

ingress:
  enabled: true
  hosts:
    - plex.localdomain

claimToken: claim-myclaimtoken

persistence:
  data: 
    storageClass: local-path
    claimName: plex-data
  config: 
    claimName: plex-config

## Copy these manually to the container settings in Kubernetes
# NVIDIA_VISIBLE_DEVICES=all
# NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
# CUDA_DRIVER_CAPABILITIES=compute,video,utility
# ADVERTISE_IP=http://192.168.2.6:32400

Is there a way to have remote access setup with this helm Plex deployment in a way that it can detect what is local vs remote Plex traffic?

I was able to resolve this by deleting the ingress, deleting the service, and then setting the following to allow host networking in the deployment. I also had to delete the ports: defined in the deployment. This would only be useful if you just want to run one Plex instance, on a single server type of thing.

spec:
  template:
    spec: 
      hostNetwork: true

Now if a remote plex user connects in from the internet -> router. It is recognized as a remote user, and a local lan TV connection is a local user in Plex.

I was able to resolve this by deleting the ingress, deleting the service, and then setting the following to allow host networking in the deployment. I also had to delete the ports: defined in the deployment. This would only be useful if you just want to run one Plex instance, on a single server type of thing.

spec:
  template:
    spec: 
      hostNetwork: true

Now if a remote plex user connects in from the internet -> router. It is recognized as a remote user, and a local lan TV connection is a local user in Plex.

Hi wrender,

Can you please clarify how you added this? I can't get remote access enabled on kubernetes deployment, I have deployed plex using helm charts.