ajslater / codex

Codex is a web based comic archive browser and reader
GNU General Public License v3.0
184 stars 6 forks source link

Running the docker container in Kubernetes #386

Open zenmaster24 opened 1 month ago

zenmaster24 commented 1 month ago

Hi,

Trying to run the docker container in kubernetes. Container works fine under docker on my Qnap NAS, but when run under kubernetes (k3s) it does not see anything in the volumes passed to it and says it suspects they are unmounted.

This is my deployment object:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: codex
  namespace: codex
  labels:
    app: codex
spec:
  selector:
    matchLabels:
      app: codex
  replicas: 1
  template:
    metadata:
      labels:
        app: codex
    spec:
      volumes:
        - name: config
          hostPath:
            path: /share/container_volumes/codex/config
        - name: media
          hostPath:
            path: /share/Multimedia/media
      containers:
        - image: docker.io/ajslater/codex
          name: codex
          ports:
            - containerPort: 9810
          volumeMounts:
            - mountPath: /config
              name: config
            - mountPath: /comics
              name: media
          env:
          - name: TIMEZONE
            value: "Australia/Sydney"
      restartPolicy: Always

Can anyone seeing anything glaringly obvious that i am missing? The media path on the host exists and has files. I am not setting the PUID/PGID so this should run as root.

I realise that kubernetes is probably not the target for the containerised app, but if it runs in docker it should run in kubernetes - just wondering if anyone else has seen this behaviour or has any insights.

Thanks