• Stars
    star
    1,223
  • Rank 38,351 (Top 0.8 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created about 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Scalable Plex Media Server on Kubernetes -- dispatch transcode jobs as pods on your cluster!

kube-plex

kube-plex is a scalable Plex Media Server solution for Kubernetes. It distributes transcode jobs by creating pods in a Kubernetes cluster to perform transcodes, instead of running transcodes on the Plex Media Server instance itself.

How it works

kube-plex works by replacing the Plex Transcoder program on the main PMS instance with our own little shim. This shim intercepts calls to Plex Transcoder, and creates Kubernetes pods to perform the work instead. These pods use shared persistent volumes to store the results of the transcode (and read your media!).

Prerequisites

  • A persistent volume type that supports ReadWriteMany volumes (e.g. NFS, Amazon EFS)
  • Your Plex Media Server must be configured to allow connections from unauthorized users for your pod network, else the transcode job is unable to report information back to Plex about the state of the transcode job. At some point in the future this may change, but it is a required step in order to make transcodes work right now.

Setup

This guide will go through setting up a Plex Media Server instance on a Kubernetes cluster, configured to launch transcode jobs on the same cluster in pods created in the same 'plex' namespace.

  1. Obtain a Plex Claim Token by visiting plex.tv/claim. This will be used to bind your new PMS instance to your own user account automatically.

  2. Deploy the Helm chart included in this repository using the claim token obtained in step 1. If you have pre-existing persistent volume claims for your media, you can specify its name with --set persistence.data.claimName. If not specified, a persistent volume will be automatically provisioned for you.

➜  helm install plex ./charts/kube-plex \
    --namespace plex \
    --set claimToken=[insert claim token here] \
    --set persistence.data.claimName=existing-pms-data-pvc \
    --set ingress.enabled=true

This will deploy a scalable Plex Media Server instance that uses Kubernetes as a backend for executing transcode jobs.

  1. Access the Plex dashboard, either using kubectl port-forward, or using the services LoadBalancer IP (via kubectl get service), or alternatively use the ingress provisioned in the previous step (with --set ingress.enabled=true).

  2. Visit Settings->Server->Network and add your pod network subnet to the List of IP addresses and networks that are allowed without auth (near the bottom). For example, 10.100.0.0/16 is the subnet that pods in my cluster are assigned IPs from, so I enter 10.100.0.0/16 in the box.

You should now be able to play media from your PMS instance - pods will be created to handle transcodes, and data automatically mounted in appropriately:

➜  kubectl get po -n plex
NAME                              READY     STATUS    RESTARTS   AGE
plex-kube-plex-75b96cdcb4-skrxr   1/1       Running   0          14m
pms-elastic-transcoder-7wnqk      1/1       Running   0          8m

More Repositories

1

kubewg

Use Kubernetes to manage & distribute Wireguard configuration
Go
176
star
2

keepalived-cloud-provider

kube-keepalived-vip cloud provider for Kubernetes 1.6+
Go
153
star
3

k8s-api-pager-demo

A demo Kubernetes controller & API server
Go
39
star
4

scaleway-kubernetes

Scaleway image to run Kubernetes
Shell
19
star
5

kube-acme

Retrieve certificates for Kubernetes Ingress resources from acme servers and store as secrets
Go
13
star
6

crd-schema-fuzz

Fuzz testing for Kubernetes CustomResourceDefinition schemas
Go
11
star
7

k8s-gluster-petset

Kubernetes PetSet for running GlusterFS
Makefile
11
star
8

ddebug

Quickly debug locked-down docker containers
Shell
10
star
9

godep-to-dep

Tool for converting Godeps.json files into Gopkg.toml
Go
8
star
10

helmsploit

A simple demonstration of privilege escalation via the default Tiller gRPC API
6
star
11

goautoneg

Mirror of bitbucket.org/ww/goautoneg
Go
6
star
12

metaldata

Open-source metadata service for private cloud environments
Go
4
star
13

haproxy

HAProxy configuration generator
Go
3
star
14

quayio-bq-exporter

Export Quay.io usage logs to BigQuery
Go
3
star
15

Dripwn

Grabs Zephyr firmware binaries from iPhones.
3
star
16

apiextensions-ca-helper

A Kubernetes CronJob to automatically update APIService and Webhook resources with the contents of Secrets or files on disk
Go
2
star
17

rpi-builder-docker

Raspberry Pi image builder using Docker
Makefile
2
star
18

manifest-splitter

Split up Kubernetes manifests into directories suitable for Anthos Config Management
Go
2
star
19

hugo-multiversion

A CLI tool to make managing multi-version Hugo sites easier
Go
2
star
20

picctv

PiCCTV Dissertation Project
Python
1
star
21

etcd-operator-poc

Go
1
star
22

ssl-checker

Basic report on SSL certificates over HTTP
Go
1
star
23

charts

Helm charts repository
Smarty
1
star
24

k8s-co

k8s.co public blog
HTML
1
star
25

gen-apidocs-img

Docker image containing utilities used to generate reference API documentation for Kubernetes API based projects
Shell
1
star
26

RuneScape-Private-Server-Emulator

An emulator for the popular online game, RuneScape
Java
1
star
27

k8s-emptypv

A FlexVolume plugin & dynamic volume provisioner for empty persistent volumes
1
star
28

django-plexauth

Django plex.tv authentication backend
Python
1
star