deployement
La commande docker avec le filesystem preparé
docker run -d \
--name=transmission \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Europe/London \
-e TRANSMISSION_WEB_HOME=/combustion-release/ `#optional` \
-e USER=username `#optional` \
-e PASS=password `#optional` \
-e WHITELIST=iplist `#optional` \
-e HOST_WHITELIST=dnsnane list `#optional` \
-p 9091:9091 \
-p 51413:51413 \
-p 51413:51413/udp \
-v <path to data>:/config \
-v <path to downloads>:/downloads \
-v <path to watch folder>:/watch \
--restart unless-stopped \
lscr.io/linuxserver/transmission
traduction en kubernetes deploy :
apiVersion: apps/v1
kind: Deployment
metadata:
name: transmissionserver
namespace: default
labels:
app: transmission
spec:
replicas: 1
selector:
matchLabels:
app: transmission
template:
metadata:
labels:
run: transmissionserver
app: transmission
spec:
containers:
- name: transmissionserver
image: lscr.io/linuxserver/transmission
env:
- name: "PUID"
value: "1000"
- name: "PGID"
value: "1000"
ports:
- containerPort: 9091
name: tr-http
- containerPort: 51413
name: tr-https
volumeMounts:
- mountPath: /config
name: tr-config
- mountPath: /downloads
name: tr-media
- mountPath: /watch
name: tr-watch
volumes:
- name: tr-watch
hostPath:
type: DirectoryOrCreate
path: /Videoclub/00-Tmp/transmission/watch
- name: tr-media
hostPath:
type: DirectoryOrCreate
path: /Videoclub/00-Tmp/transmission/downloads
- name: tr-config
hostPath:
type: DirectoryOrCreate
path: /usr/kubedata/transmissionserver/config
---
apiVersion: v1
kind: Service
metadata:
name: transmission
spec:
selector:
app: transmission
ports:
- name: "http"
port: 9091
targetPort: 9091
- name: "https"
port: 51413
targetPort: 51413
type: NodePort
puis on recupere le recupere le port d’exposition
kubectl get all --all-namespaces | grep transmission
resultat le dashboard est accecible https://<master-ip>:30312