Files
media-stack/base/qbittorrent.yaml
2026-02-27 00:55:03 +00:00

101 lines
2.3 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: qbittorrent
namespace: media
labels:
app: qbittorrent
app.kubernetes.io/name: qbittorrent
app.kubernetes.io/component: download-client
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: qbittorrent
template:
metadata:
labels:
app: qbittorrent
spec:
containers:
- name: qbittorrent
image: lscr.io/linuxserver/qbittorrent:latest
ports:
- name: http
containerPort: 8080
protocol: TCP
- name: torrent-tcp
containerPort: 6881
protocol: TCP
- name: torrent-udp
containerPort: 6881
protocol: UDP
envFrom:
- configMapRef:
name: media-config
volumeMounts:
- name: config
mountPath: /config
subPath: qbittorrent
- name: downloads
mountPath: /downloads
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1000m"
# qBittorrent doesn't have a health endpoint, so we check if the port is open
livenessProbe:
tcpSocket:
port: http
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 10
readinessProbe:
tcpSocket:
port: http
initialDelaySeconds: 15
periodSeconds: 10
timeoutSeconds: 5
volumes:
- name: config
persistentVolumeClaim:
claimName: media-config
- name: downloads
persistentVolumeClaim:
claimName: media-downloads
---
apiVersion: v1
kind: Service
metadata:
name: qbittorrent
namespace: media
labels:
app: qbittorrent
spec:
type: NodePort
selector:
app: qbittorrent
ports:
- name: http
port: 8080
targetPort: 8080
nodePort: 30080
protocol: TCP
- name: torrent-tcp
port: 6881
targetPort: 6881
nodePort: 30881
protocol: TCP
- name: torrent-udp
port: 6881
targetPort: 6881
nodePort: 30881
protocol: UDP