<p>I see that I can use the "kubectl set image" command to update a container used in a deployment, like this:</p>

<pre><code>kubectl set image deployment/myapp myapp=repo.mycompany.com/myapp/ui:beta.119
</code></pre>

<p>But, i would also like to use a different startup command in some situations. Is there a way to update both the image AND the command used for the container?</p>

John Fisher
<p>You could use <code>kubectl patch</code> for that. Run <code>kubectl patch --help</code> to get the docs, but as far as I can tell something like this should do it:</p>

<pre><code>$ kubectl patch deployment &lt;your-deployment&gt; -p '
spec:
  template:
    spec:
      containers:
        - name: &lt;container-name&gt;
          command: ["new", "command"]
' 
</code></pre>
