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

Mount NFS after container creating #88068

Open
duylong opened this issue Feb 12, 2020 · 4 comments
Open

Mount NFS after container creating #88068

duylong opened this issue Feb 12, 2020 · 4 comments

Comments

@duylong
Copy link

@duylong duylong commented Feb 12, 2020

Hi,

I would like to mount NFS volumes in containers. The mount currently uses the IP address of the source host to perform the mount. However, the host is not authorized to access it. The network part works at home, I have several routes to several interfaces. So I would like to be able to mount the volumes after the network initialization of the container and be able to mount the volumes with the right authorization.

Does this feature already exist? Do I have to mount myself in the container with a mount command ?

I want to avoid creating a common NFS, nor allow the source IP of the host to access the NFS server of the different services.

@duylong

This comment has been minimized.

Copy link
Author

@duylong duylong commented Feb 12, 2020

I mounted an NFS volume in a pod with a nfs-client image, no problem, but another pod cannot see its content.

I also tried with initcontainer but I did not succeed.

@neolit123

This comment has been minimized.

Copy link
Member

@neolit123 neolit123 commented Feb 12, 2020

/sig storage

@k8s-ci-robot k8s-ci-robot added sig/storage and removed needs-sig labels Feb 12, 2020
@duylong

This comment has been minimized.

Copy link
Author

@duylong duylong commented Feb 14, 2020

Initcontainer don't succeed because the service does not yet have the path to the container (with IPVS).

@duylong

This comment has been minimized.

Copy link
Author

@duylong duylong commented Feb 14, 2020

The only solution for now is to mount the volume directly in the container, it's less flexible but it works.

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.