Preparation
Passer 32Go de la ZFS de Proxmox au ubuntu qui host kubernetes
Dans TrueNas exposer /mnt/Magneto/9-VideoClub en SMB
Passer la carte Graphic a ubuntu
Installation filesystem
installation de Cifs et edition de fstab pour monter automatiquement le share truenas
sudo apt install cifs-utils
sudo nano /etc/fstab
//192.168.1.46/9-VideoClub /Videoclub cifs uid=0,credentials=/home/david/.smb,iocharset=utf8,noperm 0 0
Cree une partion sur le disk de 32Go provenant de Proxmox via fdisk , formater en ext4 et monter cette partion sur le filesystem /usr/kubedata
sudo nano /etc/fstab
/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part1 /usr/kubedata ext4 defaults 0 0
deployement
La commande docker avec le filesystem preparé
sudo docker run -d \
--name embyserver \
--volume /usr/kubedata/embyserver/config:/config \
--volume /Videoclub:/mnt/videoclub \
--net=host \
--device /dev/dri:/dev/dri \
--publish 8096:8096 \
--publish 8920:8920 \
--env UID=1000 \
--env GID=100 \
--env GIDLIST=100 \
emby/embyserver:latest
traduction en kubernetes deploy :
apiVersion: apps/v1
kind: Deployment
metadata:
name: embyserver
namespace: default
labels:
app: emby
spec:
replicas: 1
selector:
matchLabels:
app: emby
template:
metadata:
labels:
run: embyserver
app: emby
spec:
containers:
- name: embyserver
image: emby/embyserver:latest
env:
- name: "UID"
value: "1000"
- name: "GID"
value: "100"
- name: "GIDLIST"
value: "100"
ports:
- containerPort: 8096
name: emby-http
- containerPort: 8920
name: emby-https
volumeMounts:
- mountPath: /config
name: emby-config
- mountPath: /mnt/videoclub
name: emby-media
volumes:
- name: emby-media
hostPath:
type: Directory
path: /Videoclub
- name: emby-config
hostPath:
type: DirectoryOrCreate
path: /usr/kubedata/embyserver/config
---
apiVersion: v1
kind: Service
metadata:
name: emby
spec:
selector:
app: emby
ports:
- name: "http"
port: 8096
targetPort: 8096
- name: "https"
port: 8920
targetPort: 8920
type: NodePort
puis on recupere le recupere le port d’exposition
kubectl get all --all-namespaces | grep emby
resultat le dashboard est accecible https://<master-ip>:30647