Stateful set with `updateStrategy.type: OnDelete` does not instantiate new Pod when it exits

Hi everyone,

I am currently upgrading my MongoDB sharded cluster. To do this, I am using the OnDelete update strategy 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
Karsten

Cluster information:

Kubernetes version: 1.25
Cloud being used: AWS EKS

k8s documentation says:

When a StatefulSet’s .spec.updateStrategy.type is set to OnDelete, the
StatefulSet controller will not automatically update the Pods in a
StatefulSet. Users must manually delete Pods to cause the controller
to create new Pods that reflect modifications made to a StatefulSet’s
.spec.template.

You need to explicitly delete your pod, i.e. kubectl delete pod. Shutting down the container process is not the same apparently.