<p>I would like to update image version for my running kubernetes pod.</p>
<p>My current config is:</p>
<pre><code>spec:
  containers:
    - name: ADMIN_USER
      valueFrom:
        secretKeyRef:
          key: jenkins-admin-user
          name: jenkins
    image: jenkins/jenkins:latest
</code></pre>
<p>I would like to update it to</p>
<pre><code>spec:
  containers:
    - name: ADMIN_USER
      valueFrom:
        secretKeyRef:
          key: jenkins-admin-user
          name: jenkins
    image: jenkins/jenkins:2.247
</code></pre>
<p>I have tried to run an apply as I understood by reading documentation <code>kubectl apply -f jenkins.yaml --namespace=infrastructure</code>, but nothing changed (nor my pod was restarted automatically).</p>
<p>Can someone advice how to do this?</p>

Bob
<p>You can use <code>replace</code></p>
<p><code>kubectl replace -f jenkins.yaml --namespace=infrastructure</code></p>
