mherger wrote:
>
> > Joking aside, let's try to understand what the actual issue is here.
> [...]
> > Is Kubernetes NATing the traffic?
> [...]
> > I don't think the IP address is the problem here, but rather the port
>
> > mapping. Maybe you should start by providing actual information about
>
> > your setup before you jump to conclusions.
>
>
>
Yeah sure, so here's my setup:
- 3 cluster nodes (192.168.1.11-13)
- a virtual IP (192.168.1.10) that's assigned to the cluster and managed
with kube-vip
- cluster-internal traffic is sent via flannel in vxlan mode (k3s
default setting)
- IPTables changes outbound traffic's source IP to the node IP via NAT
(k3s default setting)
- I'm using the official LMS 8.1.1 container with HTTP_PORT set to 9001
- Traefik 2 operates as Loadbalancer and Ingress Router. It's set up to
bind to LMS' ports (TCP 9001, TCP+UDP 3484, TCP 9090) on any ip address
(0.0.0.0) the node has.
- I'm using Traefik's IngressTCP and IngressUDP to route traffic to
LMS.
Here's the deployment yaml:
Code:
--------------------
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: default
name: lms
labels:
app: lms
spec:
replicas: 1
selector:
matchLabels:
app: lms
template:
metadata:
labels:
app: lms
spec:
securityContext:
runAsUser: 0
fsGroup: 0
containers:
- name: lms
image: lmscommunity/logitechmediaserver:8.1.1-stable
tty: true
env:
- name: TZ
value: "Europe/Vienna"
- name: HTTP_PORT
value: "9001"
- name: PUID
value: "1000"
- name: PGID
value: "1002"
ports:
- name: lms-http
containerPort: 9001
- name: lms-cli
containerPort: 9090
- name: slim-tcp
containerPort: 3483
- name: slim-udp
containerPort: 3483
protocol: UDP
volumeMounts:
- mountPath: /config
name: lms-data
subPath: shared/lms/config
- mountPath: /etc/localtime
readOnly: true
name: localtime
- mountPath: /music
readOnly: true
name: lms-nas
subPath: Music
- mountPath: /playlist
readOnly: true
name: lms-nas
subPath: playlist
volumes:
- name: localtime
hostPath:
path: /etc/localtime
- name: timezone
hostPath:
path: /etc/timezone
- name: lms-data
persistentVolumeClaim:
claimName: lms-data
- name: lms-nas
persistentVolumeClaim:
claimName: lms-nas
---
apiVersion: v1
kind: Service
metadata:
name: lms
namespace: default
spec:
ports:
- name: lms-http
port: 9001
targetPort: lms-http
- name: lms-cli
port: 9090
targetPort: lms-cli
- name: slim-tcp
port: 3483
targetPort: slim-tcp
- name: slim-udp
port: 3483
targetPort: slim-udp
protocol: UDP
selector:
app: lms
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
name: lms-http
spec:
entryPoints:
- lms-http
routes:
- match: HostSNI(`*`)
services:
- name: lms
kind: Service
port: 9001
weight: 10
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteUDP
metadata:
name: lms-udp
spec:
entryPoints:
- slim-udp
routes:
- services:
- name: lms
kind: Service
port: 3483
weight: 10
--------------------
Anything else you want to know?
------------------------------------------------------------------------
fuero's Profile: http://forums.slimdevices.com/member.php?userid=71278
View this thread: http://forums.slimdevices.com/showthread.php?t=111828
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix