Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running the docker container in Kubernetes #386

Open
zenmaster24 opened this issue Jun 6, 2024 · 0 comments
Open

Running the docker container in Kubernetes #386

zenmaster24 opened this issue Jun 6, 2024 · 0 comments

Comments

@zenmaster24
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant