<p>I need to simply recreate all the pods on certain releases, say 10 in number, on a production cluster.
Is there a <code>helm</code> command to loop over release names and pods under each release should be deleted and then recreated. any hints?</p>

<p>I am familiar with </p>

<pre class="lang-sh prettyprint-override"><code>for nmspc in $namespace_list; do kubectl delete pods -n $nmspc; done
</code></pre>

<p>However, I am trying to see if there is an equivalent helm command to do the same, such that once pods are deleted under the releases, they are spun up again.</p>

<pre class="lang-sh prettyprint-override"><code>for rlsz in $release_list; do helm delete pods -n $rlsz; done
</code></pre>

<p>Does something like this exist?</p>

AhmFM
<p>@Alex Pakka suggested you right approach with <code>helm upgrade --recreate-pods &lt;release_name&gt; path/to/chart</code>, but yeah  sometimes it depends on chart.</p>

<p>Just for example I took <code>nginx-ingress-1.15.0.tgz</code> from <code>stable/nginx-ingress</code></p>

<pre><code>helm fetch stable/nginx-ingress
</code></pre>

<p>and installed in standard way</p>

<pre><code>helm install --name nginx-ingress --namespace kube-system nginx-ingress-1.15.0.tgz
</code></pre>

<p>After deploying I was able successfully recreate pods with the below command:</p>

<p><code>helm upgrade --recreate-pods nginx-ingress nginx-ingress-1.15.0.tgz --username "xxxxx" --password "xxxxx"</code> </p>

<pre><code>---
nginx-ingress-controller-cd996946d-95ndx                       1/1     Running   0          47s
nginx-ingress-default-backend-77c7c664bb-2nsdp                 1/1     Running   0          46s
---
nginx-ingress-controller-cd996946d-95ndx                       1/1     Terminating         0          93s
nginx-ingress-controller-cd996946d-dd6dc                       0/1     ContainerCreating   0          0s
nginx-ingress-default-backend-77c7c664bb-2nsdp                 1/1     Terminating         0          92s
nginx-ingress-default-backend-77c7c664bb-mnrvj                 0/1     ContainerCreating   0          0s
---
nginx-ingress-controller-cd996946d-dd6dc                       1/1     Running   0          21s
nginx-ingress-default-backend-77c7c664bb-mnrvj                 1/1     Running   0          21s
</code></pre>
