The Kubernetes StatefulSet RollingUpdate
strategy deletes and recreates each Pod in order. I am interested in updating a StatefulSet by recreating a pod and then deleting the old Pod (note the reversal), one-by-one.
This is interesting to me because:
- There is no reduction in the number of Ready Pods. I understand this is how a normal Deployment update works too (i.e. a Pod is only deleted after the new Pod replacing it is Ready).
- More importantly, it allows me to perform application-specific live migration during my StatefulSet upgrade. I would like to "migrate" data from
(old) pod-i
to(new) pod-i
before(old) pod-i
is terminated (I would implement this in(new) pod-i
readiness logic).
Is such an update strategy possible?