kubealex / k8s-mediaserver-operator

Repository for k8s Mediaserver Operator project
MIT License
559 stars 76 forks source link

[DISC] Plex Client Setup #66

Closed KnightDoom closed 1 year ago

KnightDoom commented 1 year ago

Setup: AMD64 based nodes running K3S (with Flannel ), Longhorn, Nginx Ingress and MetalLB with a NFS OMV. Note: there is no external/public dns setup involved here.

Thank you and your team for working on this operator. it is a lifesaver! I am facing a challenge in utilizing a plex app with the server. I can access the plex media server locally (using a webbrowser) via ingress at plex.domain.com However, using the plex app on a phone, tv or tablet on the local network does not discover the plex media server.

I expanded what is considered "local network" in the Network settings to include my IP pool for the router's DNS server and custom host name is populated to plex.domain.com

From what i can tell, in the client app logs, the plex pod is broadcasting its cluster ip. in other distributions, ADVERTISE_IP could be leveraged for LB style approaches. How would you manage it with an ingress?

Is there a configuration i am missing?

JosefWN commented 1 year ago

How would you manage it with an ingress?

Not sure if this is a solution for you, but I found plex.tv didn't like when I had an ingress controller (ingress-nginx) in front, it showed "Fully accessible outside your network" briefly but most of the time showed no connectivity. I ended up exposing Plex on a NodePort and disabling relaying, which made everything work smoothly. Probably more efficient to not stream high resolution video through the ingress controller as well.

The local Plex instance sends its IP to the plex.tv servers continuously, so your DNS will be "plex.tv" which you only have to use for discovering your instances when you are not on the local network. EDIT: In my case this seems to work without modifying the chart values, in the Plex Remote Access UI I can see Pod IP -> Public IP -> Internet.

KnightDoom commented 1 year ago

I see, so: you are allowing remote access which in-turn allows you to access the IP.

I ended up doing a similar change and exposing the plex via a loadBalancerIP and using that as the broadcast address via PLEX UI. So you need to leave remote access on to allow this functionality even in local networks (outside the cluster)

May i ask, what have you set your LAN Networks setting to in Plex -> Settings -> Network

JosefWN commented 1 year ago

Some apps for me use the discovery functionality provided by plex.tv because they want to function both on the local network and outside of the local network. In these cases I just assumed that this would have to work for these apps to work anywhere, regardless of whether they were on the local network or not. There could be workarounds, but it seemed like the path of least resistance... I wanted remote access either way.

The network settings are the defaults except I disabled "Enable relay".

KnightDoom commented 1 year ago

Thank you for the clarification! cheers