Skip to content

Instantly share code, notes, and snippets.

@turnipsoup
Last active May 12, 2024 16:40
Show Gist options
  • Save turnipsoup/a2eefe4c767d8c5706e8f0e9f166da51 to your computer and use it in GitHub Desktop.
Save turnipsoup/a2eefe4c767d8c5706e8f0e9f166da51 to your computer and use it in GitHub Desktop.
Transmission, but in Kubernetes!
kind: Deployment
apiVersion: apps/v1
metadata:
name: transmission-deployment
namespace: house-infra
labels:
app: transmission
spec:
replicas: 1
selector:
matchLabels:
app: transmission
template:
metadata:
name: transmission-pod
namespace: house-infra
labels:
app: transmission
spec:
containers:
- name: transmission-container
image: ghcr.io/linuxserver/transmission
ports:
- containerPort: 9091
protocol: TCP
- containerPort: 51413
protocol: TCP
- containerPort: 51413
protocol: UDP
volumeMounts:
- mountPath: /downloads
name: downloads-volume
- mountPath: /config
name: config-volume
- mountPath: /watch
name: watch-volume
env:
- name: PUID
value: "1000"
- name: PGID
value: "1000"
- name: TZ
value: "America/Los_Angeles"
- name: USER
value: "admin"
- name: PASS
valueFrom:
secretKeyRef:
name: transmission-secrets
key: transmission-password
volumes:
- name: downloads-volume
hostPath:
path: /opt/transmission/downloads
type: DirectoryOrCreate
- name: config-volume
hostPath:
path: /opt/transmission/config
type: DirectoryOrCreate
- name: watch-volume
hostPath:
path: /opt/transmission/watch
type: DirectoryOrCreate
---
kind: Service
apiVersion: v1
metadata:
name: transmission-service
namespace: house-infra
spec:
type: NodePort
selector:
app: transmission
ports:
- protocol: TCP
name: web-interface
port: 9091
nodePort: 9091
- protocol: TCP
name: torrent-tcp
port: 51413
nodePort: 51413
- protocol: UDP
name: torrents-udp
port: 51413
nodePort: 51413
apiVersion: v1
kind: Secret
metadata:
name: transmission-secrets
namespace: house-infra
stringData:
transmission-password: SecretPass!
@turnipsoup
Copy link
Author

There are multiple things that can be happening

  1. There could be another firewall (your router) blocking this traffic coming in from the internet.
  2. iptables (or something similar) could be enabled on the local box and be filtering traffic. You could try fully disabling the firewall on the kubernetes host. You can use netcat to test UDP connectivity.
  3. Use tcpdump either on the host machine or inside of the transmission pod to see what packets are actually being processed.

There are also a lot of discussions around using transmission in containers on their support site: https://discourse.linuxserver.io/tag/transmission

@urbaman
Copy link

urbaman commented Feb 21, 2024

Ok, turns out to be a Suricata rule on my pfSense firewall!

Thank you for your insight!

@turnipsoup
Copy link
Author

I am happy you figured it out! Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment