<p>There is a K8S cluster, and most of our Deployments are just updating image's version, but sometimes we'd like to update some parts of Deployment configuration as well. Our Deployment config doesn't include images' tags.</p>

<p>For updating image version <code>kubectl set image</code> seems me the best option.
As for updating Deployment configuration and image together, I see a few ways:</p>

<ul>
<li>kubectl deploy ... : <code>kubectl set image ...</code> [but there are two Deployments]</li>
<li>editing Deployment YAML with actual image tag [seems me less elegant]</li>
<li>kubectl patch [but for this we should prepare separate patch YAML?]</li>
</ul>

<p>What do you suggest?
TIA,
Vitaly</p>

Vitaly Karasik DevOps
<p>Honestly, the thing is up to you that what you like.</p>

<ul>
<li>If you don't like having two versions of your Deployment, then don't use <code>kubectl set image ...</code>.</li>
<li>If you don't like to bother with preparing patch string for <code>kubectl patch ...</code> command then don't do it too.</li>
<li>So just edit the existing Deployment one. You can use <code>kubectl edit ...</code> command or <code>kubectl apply -f path/to/your_deployment_configuration_file</code>.</li>
</ul>
