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
Kubernetes doesn't have a same feature as Docker's volumes-from #103814
Comments
@lojies: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/sig node |
/kind support Sharing contents of containers is a pretty different problem to sharing data between them. Is there a reason you can't include the tool inside the container that needs it? |
For example, i need to use jdk in containers, but for the security reason, the jdk need to be upgraded frequently.But my app is upgraded less, i don't want to build image frequently.So if data can be shared between containers like docker, i can only change docker images. |
I'd definitely not recommend doing that - Rebuilding the single image usually also means that you can validate your application with new versions of dependencies prior to deploying them to your clusters. Trying to share dependencies across different containers is always going to be somewhat painful and difficult to manage over time. You could use multi-stage builds, or copy an externally built application binary into a container during its build process for example to minimize rebuild time if that's what you're worried about there. |
/close |
@endocrimes: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What would you like to be added:
For example, there is a data volume in the docker image, it can be userd by another container directly through --volumes-from.
Dockerfile like:
FROM ubuntu
MAINTAINER hello
VOLUME ["/data"]
docker run --name test1 -it myimage /bin/bash
docker run --name test2 -it --volumes-from test1 ubuntu /bin/bash
I want to share data between containers in the same pod.For example, pod have two containers: containerA and containerB. containerA has a tool git and i want to use it in containerB. Volume emptyDir seems can do this, but i need copy git to the volume path and then containerB can use it.
Can someway omit copy?Because copy may cause cpu and io high and make some warning.
Why is this needed:
The text was updated successfully, but these errors were encountered: