I've a deployment whose app makes a lock on a file, and crash if there's any existing lock. How can I ask Kubernetes to remove the old pod before spinning up the new one ?
I know you usually want the opposite, spinning up the new, and only when it's ready remove the old, to avoid downtime. For this case I don't care, it's typesense in a developments environments, we're using the SaaS for staging & production.
Thanks for any help !
Easiest way to achieve that is to set the upgrade strategy to
Recreate
.From docs: