freegroup / kube-s3

Kubernetes pods used shared S3 storage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Host share on example pod is lost when s3-provider is restarted

guysoft opened this issue · comments

It you set the host share to the same path as the mountpoint oh the host, if the host remounts the fuse volume, the example pod looses the folder link and gets Transport endpoint is not connected

The workaround I found was to mount on the example pod a folder up the tree, and then that folder remains static and does not get a different mapping if the fuse gets remounted. That way the folder remains in place and the subfolder that mounted has its node updated correctly.

Ideally you would want something like

  volumes:
  - name: mntdatas3fs
    hostPath:
      path: /mnt
      subpath: data-s3-fs

I am not sure if that is a feature available in Kubernets. will test.

Tested, works

perfect. Thanks for your feedback.

There is no subpath feature in kubernetes volume section.

My version is
Client Version: v1.17.9-eks
Server Version: v1.14.9-eks

Error while starting the daemon

error while creating mount source path '/mnt/data-s3-fuse': mkdir /mnt/data-s3-fuse: file exists

The issue still persists and i have to unmount the hostpath everytime to get it working.

kubernetes 1.14 is not supported for this. We use 1.19.2

Subpath are for volumeMounts right as mentioned here ?

  • name: php
    image: php:7.0-apache
    volumeMounts:
    • mountPath: /var/www/html
      name: site-data
      subPath: html

But not for volumes as specified above.
What could be the other solution for this issue?