<p dir="auto">I have a DaemonSet configured as follows:</p>
<p dir="auto"><code class="notranslate">daemonset.yaml</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: bugreport-daemonset
spec:
  template:
    metadata:
      labels:
        app: bugreport
    spec:
      containers:
      - name: bugreport-container
        image: gcr.io/bug-project/testcontainer:tag0
        imagePullPolicy: Always
        ports:
        - containerPort: 80"><pre class="notranslate"><code class="notranslate">apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: bugreport-daemonset
spec:
  template:
    metadata:
      labels:
        app: bugreport
    spec:
      containers:
      - name: bugreport-container
        image: gcr.io/bug-project/testcontainer:tag0
        imagePullPolicy: Always
        ports:
        - containerPort: 80
</code></pre></div>
<p dir="auto">When I run <code class="notranslate">kubectl apply -f daemonset.yaml</code> i can see the pods running on each node.</p>
<p dir="auto">But if I change the image to <code class="notranslate">gcr.io/bug-project/testcontainer:tag1</code> and then run <code class="notranslate">kubectl apply -f daemonset.yaml</code> again, the pods are never updated with the new container image.</p>
<p dir="auto">Hi,</p>
<p dir="auto">Sorry for doing it in the wrong order as mentioned here : <a href="https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md#contributing-a-patch">https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md#contributing-a-patch</a></p>
<p dir="auto">I did <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="138218358" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/22439" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/22439/hovercard" href="https://github.com/kubernetes/kubernetes/pull/22439">#22439</a> to address this problem (on kubectl side)</p>
<p dir="auto">The need is to be able to update a daemon set in a single command line.<br>
Basically it is equivalent to do :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="kubectl delete  -f dsfile  --cascade=false
kubectl create   -f dsfile
for pod in pods
kubectl  delete pod
wait for delete"><pre class="notranslate"><code class="notranslate">kubectl delete  -f dsfile  --cascade=false
kubectl create   -f dsfile
for pod in pods
kubectl  delete pod
wait for delete
</code></pre></div>
<p dir="auto">EDIT : <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bgrant0607/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bgrant0607">@bgrant0607</a> suggested to update the ds instead of delte / recreate</p>