2

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.

Wytrzymały Wiktor
  • 11,492
  • 5
  • 29
  • 37
JDev
  • 2,157
  • 3
  • 31
  • 57

1 Answers1

0

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.

  • thanks for the answer, but why @gohm'c says that is possible? https://longhorn.io/docs/1.2.3/snapshots-and-backups/csi-volume-clone/ – JDev Feb 17 '22 at 10:24
  • Longhorn is 3rd party block storage solution. My answer relates to just kubernetes. Should have specified that. –  Feb 17 '22 at 10:40
  • Understood. I know that. Thanks – JDev Feb 17 '22 at 14:05