<p>How to change the restart policy of a running pod from <code>Always</code> to <code>Never</code>. I've <code>kubectl edit</code> but it does not allow to change it. </p>

<p>If <code>kubectl edit</code> is not allowing you to change the <code>restartPolicy</code></p>

<p>Do this,
<code>kubectl delete deployment &lt;deployment_name&gt;</code></p>

<p>Edit yaml file with new changes.
Then create deployment again.
<code>kubectl create -f deployment.yaml</code></p>

<p><strong>Or</strong> </p>

<p>Edit yaml file with new changes.
and apply changes to deployment using.
<code>kubectl apply -f deployment.yaml</code></p>

<p>This will delete old pod and will create new pod with new changes.</p>
