<p>i am trying to update container image using:</p>

<pre><code>kubectl set image deployment/deployment name container name=
newimage:39
</code></pre>

<p>but facing this error </p>

<p>error: all resources must be specified before image changes:</p>

bilal_khan
<pre><code>   kubectl set image deployment/&lt;deployment-name&gt; &lt;container-name&gt;=$IMAGE
</code></pre>

<p>You can also try patch the deployment</p>

<pre><code>kubectl patch deployment/deployment_name --patch "{\"spec\": {\"template\": {\"spec\": {\"initContainers\": [{\"name\": \"container_name\",\"image\": \"url_to_container\"}]}}}}"
</code></pre>
