<p>I have a cluster and node creates in AWS EKS. I applied the deployment to that cluster as under</p>
<pre><code>kubectl apply -f deployment.yaml
</code></pre>
<p>Where deployment.yaml contains the containers' specification along with DockerHub repo and image</p>
<p>However, I did a mistake in deployment.yaml and I need to re-apply it to the configuration</p>
<p>My question is:</p>
<p>1 - How do I reapply a deployment.yaml to the AWS EKS cluster using kubectl?
Just running the above command is not working (<code>kubectl apply -f deployment.yaml</code>)</p>
<p>2- After I re-apply the deployment.yaml , will the node will go an pick up the DockerHub image or do I still need to do something else( supposing all the other details are ok)</p>
<p>Some outputs below:</p>
<pre><code>&gt;&gt; kubectl get pods

my-app-786dc95d8f-b6w4h   0/1     ImagePullBackOff   0          9h
my-app-786dc95d8f-w8hkg   0/1     ImagePullBackOff   0          9h
</code></pre>
<pre><code>kubectl describe pod my-app-786dc95d8f-b6w4h                                                                            
Name:         my-app-786dc95d8f-b6w4h
Namespace:    default
Priority:     0
Node:         ip-192-168-24-13.ec2.internal/192.168.24.13
Start Time:   Fri, 10 Jul 2020 12:54:38 -0400
Labels:       app=my-app
              pod-template-hash=786dc95d8f
Annotations:  kubernetes.io/psp: eks.privileged
Status:       Pending
IP:           192.168.7.235
IPs:
  IP:           192.168.7.235
Controlled By:  ReplicaSet/my-app-786dc95d8f
Containers:
  simple-node:
    Container ID:
    Image:          BAD_REPO/simple-node
    Image ID:
    Port:           80/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       ImagePullBackOff
    Ready:          False
    Restart Count:  0
    Environment:    &lt;none&gt;
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-mwwvl (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             False
  ContainersReady   False
  PodScheduled      True
Volumes:
  default-token-mwwvl:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-mwwvl
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  &lt;none&gt;
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason   Age                    From                                    Message
  ----     ------   ----                   ----                                    -------
  Normal   BackOff  17m (x2570 over 9h)    kubelet, ip-192-168-24-13.ec2.internal  Back-off pulling image &quot;BAD_REPO/simple-node&quot;
  Warning  Failed   2m48s (x2634 over 9h)  kubelet, ip-192-168-24-13.ec2.internal  Error: ImagePullBackOff
</code></pre>
<p>BR</p>

MasterOfTheHouse
<p>if you need to change image:</p>
<pre><code>kubectl set image deployment.v1.apps/{your_deployment_name} image_name:tag
</code></pre>
<p>but you always can do</p>
<pre><code>kubectl delete -f deployment.yaml
kubectl create -f deployment.yaml
</code></pre>
<p>since your image is in <code>ImagePullBackOff</code> - it doesn't work anyway and you can just recreate deployment. Usually you don't do drop/create on prod. that is why i am using image change all the time. just have to change tag on every new image.</p>
