Accessing persistent volume portably after job completion

3/26/2018

I would like to use jobs and regular deployments that write results to persistent volumes. Then when the job is complete, I need to access those results. The system will run on multiple different platforms, for example Azure (AKS). Ideally I would like to use persistent volume claims where the actual volumes are created automatically. That works well. However, I haven't found a portable way to access the data afterwards. Is there one that I have missed?

I can probably use AKS commands and mount the underlying storage in AKS, but then I need to build one solution per platform. Kubernetes supports custom recycling plugins, but I don't want to recycle the data. I want to access it portably (i.e. through Kubernetes) and then delete the volume. Is this possible? If not, is it on the road map?

-- ewramner
azure-container-service
kubernetes

1 Answer

3/30/2018

If you want a platform-independent solution, the best way, I think, is to use some cross-platform storage which will work everywhere and provide some easy ways to access them.

That can be NFS, GlusterFS or AzureFiles storage, which you can mount at any time on almost any platform.

Yes, in Kubernetes you can access your volumes which already exists, but in case of dynamically created volumes, you potentially may have problems with managing an amount of them in future. And, unfortunately, Kubernetes do not have any recycling policies like "mount twice and remove a volume" or anything like that.

My idea would be to use storage which can be mounted in ReadWriteMany mode. Check the table with the list of available modes for different storage types.

You can use the same volume for all your jobs and at the same time manage data on that volume using third party tool without any additional work.

And of course, you will be able to clean data which you already don't need.

-- Anton Kostenko
Source: StackOverflow