There are 5 containers in my pod in kubernetes deployment. I want to transfer files from 1 container to another container.
How to go about this?
The most common approach to this would be to use EmptyDir volume, run an initContainer that will spin up the image you want to copy from, mount target volume in it and perform the copy, before the actual containers forming your pod runtime will take the same volume and mount it for their use.
If you need to run the copy (transfer) operation during actual operation then you should mount a shared volume (most likely EmptyDir as well) on both containers and just use it as a shared storage space.