I am currently upgrading my MongoDB sharded cluster. To do this, I am using the OnDelete update strategy on my stateful set so that I can shut down the secondary nodes first and then the primary nodes. However, as soon as I run db.adminCommand( { shutdown: 1 } ) and the pod is shut down, a new pod is created, but still with the old template. This was somewhat unexpected for me as the template is already updated in the stateful set.
Is this the expected behaviour or a bug or am I missing something?
Thanks in advance and best regards
Ledex
k8s documentation says:
You need to explicitly delete your pod, i.e.
kubectl delete pod. Shutting down the container process is not the same apparently.