# StatefulSet PODs Not Getting Deleted After Helm Upgrade

## Problem

* After helm upgrade the statefulset gets upgraded but POD were not re-created

## Environment

* Platform9 Managed Kubernetes -- All version

## Cause

* Statefuset `updateStrategy` is set to "`OnDelete"`
* The Statefulset 'upgradeStrategy' field is set to type 'OnDelete'

{% tabs %}
{% tab title="Bash" %}

```bash
updateStrategy:
    type: OnDelete
  volumeClaimTemplates:
  - apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      creationTimestamp: null
      name: imcdiamstorage
```

{% endtab %}
{% endtabs %}

## Resolution

* There are two ways to overcome this issue

1. Delete the statefulset's POD's manually after helm upgrade
2. Set the 'upgradeStrategy' field to type 'RollingUpgrade'

## Additional Information

* Check [Kubernetes Documentation for StatefulSet](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) Upgrade Strategy


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://platform9.com/kb/pmk/solutions/pod-s-from-statefulset-not-getting-deleted-after-helm-upgrade.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
