lknite
November 9, 2024, 6:03pm
1
kube-plex (the ressu version on github) is a neat little project which spins up pods whenever transcoding is needed, allowing for some level of horizontal scaling.
I recently saw that plex now offers a helm chart, so I figure your devs are probably aware of kube-plex.
My homelab hardware wasn’t enough to get kube-plex working in the past but recently I’ve upgraded some things and decided to give kube-plex another shot, only to discover that something within plex has resulted in kube-plex not working as well as it used to… basically making it unusable now.
I understand when people say it would take a whole rewrite of plex to implement horizontal scaling but I wonder, could an engineer out there throw us a bone and make it so kube-plex can work again? Adjust whatever it is on the pms side that caused kube-plex to break?
lknite
November 9, 2024, 6:56pm
4
My comment has ‘(the ressu version)’ in it, and I’ve been in contact with him, that’s why I’m saying there has been a change in plex that broke kube-plex.
I’ll start looking through all the forks, but I believe ressu when he says there’s been a change that makes the kube-plex strategy no longer work.
Apologies. Completely missed that you mentioned the version. Time for another cup of coffee.
1 Like
lknite
November 9, 2024, 7:25pm
6
Thread discussing the change that plex made which seems to make it so the kube-plex strategy doesn’t work anymore:
opened 04:59AM - 17 Jan 23 UTC
With some newer videos I've been experiencing the transcoding failing, while eve… rything works if I disable kube-plex. Since the transcoding pod is just using the libraries from the pms image, can we say that it must be crashing due to resources such as memory / cpu? I'm not seeing any cpu or memory errors if I 'k describe pod pms-...'. Here's from the description of a pms pod that errored out:
```
/shared/transcode-launcher
--pms-addr=plex-kube-plex:32400
--listen=:32400
--codec-server-url=http://172.16.29.207:46377/
--codec-dir=/shared/codecs/
--loglevel=verbose
--
/usr/lib/plexmediaserver/Plex Transcoder
-codec:0
h264
-codec:1
dca
-ss
0
-noaccurate_seek
-analyzeduration
20000000
-probesize
20000000
-i
/data-ceph/media/video.mkv
-map
0:0
-metadata:s:0
language=eng
-codec:0
copy
-filter_complex
[0:1] aresample=async=1:ochl='stereo':rematrix_maxval=0.000000dB:osr=48000[0]
-map
[0]
-codec:1
aac
-b:1
256k
-f
dash
-seg_duration
5
-dash_segment_type
mp4
-init_seg_name
init-stream$RepresentationID$.m4s
-media_seg_name
chunk-stream$RepresentationID$-$Number%05d$.m4s
-window_size
5
-delete_removed
false
-skip_to_segment
1
-time_delta
0.0625
-manifest_name
http://127.0.0.1:32400/video/:/transcode/session/oc8rzgp4ykdd5c1vemkyqzsv/ff5b9d61-2030-4ac6-a394-a85f2d671a55/manifest?X-Plex-Http-Pipeline=infinite
-avoid_negative_ts
disabled
-map_metadata
-1
-map_chapters
-1
dash
-start_at_zero
-copyts
-vsync
cfr
-y
-nostats
-loglevel
quiet
-loglevel_plex
error
-progressurl
http://127.0.0.1:32400/video/:/transcode/session/oc8rzgp4ykdd5c1vemkyqzsv/ff5b9d61-2030-4ac6-a394-a85f2d671a55/progress
Environment:
CHANGE_CONFIG_DIR_OWNERSHIP: true
CWD: /
FFMPEG_EXTERNAL_LIBS: /config/Library/Application Support/Plex Media Server/Codecs/583b3e4-4434-linux-x86_64/
HOME: /config
HOSTNAME: plex-kube-plex
KUBERNETES_PORT: tcp://10.102.83.66:443
KUBERNETES_PORT_443_TCP: tcp://10.102.83.66:443
KUBERNETES_PORT_443_TCP_ADDR: 10.102.83.66
KUBERNETES_PORT_443_TCP_PORT: 443
KUBERNETES_PORT_443_TCP_PROTO: tcp
KUBERNETES_SERVICE_HOST: 10.102.83.66
KUBERNETES_SERVICE_PORT: 443
KUBERNETES_SERVICE_PORT_HTTPS: 443
LANG: C.UTF-8
LC_ALL: C.UTF-8
LIBVA_DRIVERS_PATH: /usr/lib/plexmediaserver/lib/dri
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PLEX_CLAIM: claim-prXr9GZhkGswzuq5NFqf
PLEX_KUBE_PLEX_PORT: tcp://10.101.156.200:32400
PLEX_KUBE_PLEX_PORT_32400_TCP: tcp://10.101.156.200:32400
PLEX_KUBE_PLEX_PORT_32400_TCP_ADDR: 10.101.156.200
PLEX_KUBE_PLEX_PORT_32400_TCP_PORT: 32400
PLEX_KUBE_PLEX_PORT_32400_TCP_PROTO: tcp
PLEX_KUBE_PLEX_PORT_443_TCP: tcp://10.101.156.200:443
PLEX_KUBE_PLEX_PORT_443_TCP_ADDR: 10.101.156.200
PLEX_KUBE_PLEX_PORT_443_TCP_PORT: 443
PLEX_KUBE_PLEX_PORT_443_TCP_PROTO: tcp
PLEX_KUBE_PLEX_PORT_80_TCP: tcp://10.101.156.200:80
PLEX_KUBE_PLEX_PORT_80_TCP_ADDR: 10.101.156.200
PLEX_KUBE_PLEX_PORT_80_TCP_PORT: 80
PLEX_KUBE_PLEX_PORT_80_TCP_PROTO: tcp
PLEX_KUBE_PLEX_SERVICE_HOST: 10.101.156.200
PLEX_KUBE_PLEX_SERVICE_PORT: 32400
PLEX_KUBE_PLEX_SERVICE_PORT_HTTP: 80
PLEX_KUBE_PLEX_SERVICE_PORT_HTTPS: 443
PLEX_KUBE_PLEX_SERVICE_PORT_PMS: 32400
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR: /config/Library/Application Support
PLEX_MEDIA_SERVER_HOME: /usr/lib/plexmediaserver
PLEX_MEDIA_SERVER_INFO_DEVICE: Docker Container
PLEX_MEDIA_SERVER_INFO_MODEL: x86_64
PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION: 5.14.0-197.el9.x86_64
PLEX_MEDIA_SERVER_INFO_VENDOR: Docker
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS: 6
PWD: /run/s6/services/plex
SHLVL: 0
TERM: xterm
TZ: America/Denver
X_PLEX_TOKEN: local-5a681bf3-4aad-490e-910c-9528b9db5657
Mounts:
/data from data (rw)
/shared from shared (rw)
/transcode from transcode (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-9q9gw (ro)
Conditions:
Type Status
PodScheduled True
Volumes:
shared:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit: <unset>
data:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: plex-truenas-data
ReadOnly: false
transcode:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: plex-kube-plex-transcode
ReadOnly: false
kube-api-access-9q9gw:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors: beta.kubernetes.io/arch=amd64
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 8s default-scheduler Successfully assigned plex/pms-elastic-transcoder-m5zn9-h9m5r to k-root-b-w3
Normal Pulled 1s kubelet Container image "ghcr.io/ressu/kube-plex@sha256:0566d16c9e0859c2c14cc8d825079c92fb099593296f0fcb447ad410840f5ea4" already present on machine
Normal Created 1s kubelet Created container kube-plex-init
Normal Started 1s kubelet Started container kube-plex-init
```
system
Closed
February 7, 2025, 7:26pm
7
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.