45 lines
2.0 KiB
YAML
45 lines
2.0 KiB
YAML
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
name: jellyfin-udp # < name of the service
|
|
namespace: jellyfin # < namespace where to place service
|
|
annotations:
|
|
metallb.universe.tf/allow-shared-ip: jellyfin # # < annotation name to combine the Service IP, make sure it's same name as in the service UDP yaml
|
|
spec:
|
|
selector:
|
|
app: jellyfin # < reference to the deployment (connects the service with the deployment)
|
|
ports:
|
|
- port: 1900 # < port to open on the outside on the server
|
|
targetPort: 1900 # < targetport. port on the pod to passthrough
|
|
name: dlna-udp # < reference name for the port in the deployment yaml
|
|
protocol: UDP
|
|
- port: 7359
|
|
targetPort: 7359
|
|
name: discovery-udp
|
|
protocol: UDP
|
|
type: LoadBalancer
|
|
loadBalancerIP: xxx.xxx.xxx.xxx # < IP to access your jellyfinserver. Should be one from the MetalLB range and the same as the UDP yaml
|
|
sessionAffinity: ClientIP # This is necessary for multi-replica deployments
|
|
---
|
|
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
name: jellyfin-tcp # < name of the service
|
|
namespace: jellyfin # < namespace where to place service
|
|
annotations:
|
|
metallb.universe.tf/allow-shared-ip: jellyfin # < annotation name to combine the Service IP, make sure it's same name as in the service UDP yaml
|
|
spec:
|
|
selector:
|
|
app: jellyfin # < reference to the deployment (connects the service with the deployment)
|
|
ports:
|
|
- port: 8096 # < port to open on the outside on the server
|
|
targetPort: 8096 # < targetport. port on the pod to passthrough
|
|
name: http-tcp # < reference name for the port in the deployment yaml
|
|
protocol: TCP
|
|
- port: 8920
|
|
targetPort: 8920
|
|
name: https-tcp
|
|
type: LoadBalancer
|
|
loadBalancerIP: xxx.xxx.xxx.xxx # < IP to access your jellyfinserver. Should be one from the MetalLB range and the same as the TCP yaml
|
|
sessionAffinity: ClientIP # This is necessary for multi-replica deployments
|