/tmp semantics regarding ram/disk

Hi all,

I am curious if I write to /tmp in a running container (to generate a PDF) using the k8s executor, is /tmp a RAM disk or not? I need to determine if when I write to /tmp if the file is actually getting written to disk or not?

Thanks!

Hi Joe,

Do you know if that pod has any volumes attached at that location? If /tmp is mounted as a persistent volume then it will write to that volume. If /tmp isn’t mounted as a persistent volume or emptyDir then it is written in the writable layer of the underlying container runtime. If you’re using Docker, containerD, or CRI-O, a good explanation can be found here. You can view the location of the underlying container’s volumes with the container runtimes inspect command.

Best Regards,
Ralph

Ralph, thanks for the response.

Yes, this is a question about how Astronomer Cloud works precisely. With your response, I will assume that writes are exhibiting the default behavior with regards to the top writable layer, and will be deleted when a garbage collection process runs to clean up stopped containers.

I will need to set up a volume on my worker pods to be a ramdisk. I will follow up with my astronomer rep. Thanks again for your help getting this answered.