Thanks for the inspiration!

I used the same logic, with a tweak: I run mountin a (privileged) initContainer and place my umount in a sidecar (privileged) container that sleeps forever until preStop.

Compared to the approach documented here, mine seems a tad more complex. But there’s no readinessProbe or setup_complete dummy file. (My app requires the mounts during startup; readinessProbe doesn’t delay startup, so I needed another approach.)

Journalist, ex software engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store