1

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?

Nick Rak
  • 3
  • 3
ewramner
  • 5,810
  • 2
  • 17
  • 33

1 Answers1

0

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
  • 8,200
  • 2
  • 30
  • 37
  • That is an option, but I'm really looking for a portable solution through K8s. I can run the current solution without prior setup in minikube, in AKS and in any other modern cluster. The only problem is that I can't access results from volumes when the pod is gone. That can be solved in various ways, but it would have been great if it was possible to remount a given volume elsewhere through the platform. – ewramner Mar 30 '18 at 16:00