Several named volumes have been created in docker-compose. How to create these in Kubernetes?
How to transform the following named volume example defined in docker-compose to kubernetes format
version: "3"
services:
x:
image: z
volumes:
- a:/path/inside/container
y:
image: c
volumes:
- a:/path/inside/container
volumes:
a:
emptyDir: {}required if content from one container has to be shared with another container? – 030 Aug 21 '17 at 15:37emptyDiris one of the container types. As stated in linked docs "AnemptyDirvolume is first created when a Pod is assigned to a Node, and exists as long as that Pod is running on that node." So this is simple directory on storage assigned to the runner. This can be used to share data however this data should be treated as ephemeral. – Hauleth Aug 21 '17 at 15:42emptyDir, but the data is not ephemeral. I don't want to have to define ahostPathor anything similar- I would like k8s to simply allocate some persistent disk resources for me and mount them onto a container. This is for local dev only - not needed for production. I've read the docs, but nothing seems clear and easy for what is so simple in docker-compose world. – Ryan Wheale Jul 21 '21 at 17:42