Skip to content
This repository has been archived by the owner on Aug 7, 2020. It is now read-only.

Volumes in Kuberenetes #93

Open
Philippe-Collignon opened this issue Dec 4, 2018 · 2 comments
Open

Volumes in Kuberenetes #93

Philippe-Collignon opened this issue Dec 4, 2018 · 2 comments

Comments

@Philippe-Collignon
Copy link

Hello,

Dockerfile define docker local volumes
`` VOLUME ["/opt/emqx/log", "/opt/emqx/data", "/opt/emqx/lib", "/opt/emqx/etc"] ```

In K8s, those volumes are on host and pod might change to another host ..
so it would be better to define K8s volumes ..

There are two issues :

  • first make a custom image without docker local volumes
  • manage user rights ..

Do you have any docker image for K8s and deployment yaml file with volumes ?

@spring2maz
Copy link
Contributor

Hi @Philippe-Collignon
Thanks for reporting this.
We should perhaps remove those directories from docker volumes starting from 3.0.

Volumes can be mount+bind at run time.
If users really want it to be docker volume, they can add VOLUME directive on top.
Otherwise there is no way to override existing volumes,
i.e. if users do not want them, they will have to re-build image

@turtleDeng @terry-xiaoyu what do you think

@Philippe-Collignon
Copy link
Author

Thanks for your answer.
I made an image without docker volumes and create corresponding K8s volumes but then we face another issue because some files in the mounted paths are part of the image .. (i.e. files in /opt/emqx/etc) ... mounting a volume to that path just erase them ...
I finished by creating only one volume for mnesia .. for other files, we need to add them after container startup (in start.sh for example)

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

No branches or pull requests

2 participants