0

I am working on a snapshotting of PV before POD deletion completes. I have written a controller which works on delete event of POD, but by the time it triggers delete event POD deletion is already completed.

I want to do below things automatically between POD termination signal and deleted.

  • Take snapshot of PV
  • Update PVC with Snapshot DataSource
  • Delete PV

Any ideas on how to implement this flow ...

Slok
  • 576
  • 1
  • 12
  • 27

1 Answers1

0

Do you set a finalizer for this pod in your controller?
If you set a finalizer, The pod deletion will be blocked till you delete the finalizer in your controller ;
You can snapshot you pv when event POD deletion is triggered, and when finished, delete the finalizer, and update its status.

Miffa Young
  • 107
  • 4