Kubernetes way or Operator to clone PV between namespaces

486 Views Asked by At

Please tell me the best way to clone PV between namespaces. I read that cloning is only possible in a single namespace.

So far the best way I see is to explicitly copy the files from one folder to another after creating the PVC.

But I would like to create one PV and use it as a template for deployments. I use Longhorn for disk management.

Thanks.

1

There are 1 best solutions below

3
AudioBubble On

Such functionality is not yet supported. There is some work done (Add proposal for transfer of VolumeSnapshot #2849 ) for similar feature, but it's not yet ready.

As of today, explicitly copying files is your best bet.