Last active
March 1, 2022 00:57
-
-
Save Woovie/64f1844247a302bfb7e60916275e1db6 to your computer and use it in GitHub Desktop.
My personal Plex instance k8s config using microk8s, metallb. Based on/customized from https://github.com/timwebster9/pihole-microk8s-demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: plex | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: plex | |
name: plex | |
namespace: plex | |
spec: | |
progressDeadlineSeconds: 600 | |
replicas: 1 | |
revisionHistoryLimit: 0 | |
selector: | |
matchLabels: | |
app: plex | |
strategy: | |
rollingUpdate: | |
maxSurge: 0 | |
maxUnavailable: 1 | |
type: RollingUpdate | |
template: | |
metadata: | |
labels: | |
app: plex | |
spec: | |
nodeSelector: | |
kubernetes.io/hostname: akira | |
containers: | |
- env: | |
- name: PLEX_CLAIM | |
value: a-secret-goes-here | |
- name: VERSION | |
value: docker | |
image: linuxserver/plex:latest | |
imagePullPolicy: IfNotPresent | |
name: plex | |
ports: | |
- containerPort: 32400 | |
name: pms-web | |
protocol: TCP | |
- containerPort: 32469 | |
name: dlna-tcp | |
protocol: TCP | |
- containerPort: 1900 | |
name: dlna-udp | |
protocol: UDP | |
- containerPort: 32410 | |
name: gdm-10 | |
protocol: UDP | |
- containerPort: 32412 | |
name: gdm-12 | |
protocol: UDP | |
- containerPort: 32413 | |
name: gdm-13 | |
protocol: UDP | |
- containerPort: 32414 | |
name: gdm-14 | |
protocol: UDP | |
resources: {} | |
stdin: true | |
tty: true | |
volumeMounts: | |
- mountPath: /media | |
name: plex-media | |
- mountPath: /config | |
name: plex-config | |
dnsPolicy: ClusterFirst | |
restartPolicy: Always | |
schedulerName: default-scheduler | |
securityContext: {} | |
terminationGracePeriodSeconds: 30 | |
volumes: | |
- hostPath: | |
path: /media | |
type: "" | |
name: plex-media | |
- hostPath: | |
path: /media/plex/config | |
type: "" | |
name: plex-config | |
--- | |
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: plex-tcp | |
namespace: plex | |
annotations: | |
metallb.universe.tf/allow-shared-ip: plex | |
spec: | |
selector: | |
app: plex | |
ports: | |
- port: 32400 | |
targetPort: 32400 | |
name: pms-web | |
protocol: TCP | |
- port: 32469 | |
targetPort: 32469 | |
name: dlna-tcp | |
protocol: TCP | |
type: LoadBalancer | |
loadBalancerIP: 10.0.0.10 | |
allocateLoadBalancerNodePorts: false | |
--- | |
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: plex-udp | |
namespace: plex | |
annotations: | |
metallb.universe.tf/allow-shared-ip: plex | |
spec: | |
selector: | |
app: plex | |
ports: | |
- port: 1900 | |
targetPort: 1900 | |
name: dlna-udp | |
protocol: UDP | |
- port: 32410 | |
targetPort: 32410 | |
name: gdm-10 | |
protocol: UDP | |
- port: 32412 | |
targetPort: 32412 | |
name: gdm-12 | |
protocol: UDP | |
- port: 32413 | |
targetPort: 32413 | |
name: gdm-13 | |
protocol: UDP | |
- port: 32414 | |
targetPort: 32414 | |
name: gdm-14 | |
protocol: UDP | |
type: LoadBalancer | |
loadBalancerIP: 10.0.0.10 | |
allocateLoadBalancerNodePorts: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment