Communication between 2 pods in Kubernetes
You can use kubectl cp
to copy files and directories between pods.
However in your case you probably want to create two deployments and copy files from pods of one deployments to pods of another deployment. Otherwise the service could point to the same pods.