<p>I have created a replicaset with wrong container image with below configuration.</p>

<pre><code>apiVersion: extensions/v1beta1
kind: ReplicaSet
metadata:
  name: rs-d33393
  namespace: default
spec:
  replicas: 4
  selector:
    matchLabels:
      name: busybox-pod
  template:
    metadata:
      labels:
        name: busybox-pod
    spec:
      containers:
      - command:
        - sh
        - -c
        - echo Hello Kubernetes! &amp;&amp; sleep 3600
        image: busyboxXXXXXXX
        name: busybox-container
</code></pre>

<p>Pods Information:</p>

<pre><code>$ kubectl get pods
NAME              READY     STATUS             RESTARTS   AGE
rs-d33393-5hnfx   0/1       InvalidImageName   0          11m
rs-d33393-5rt5m   0/1       InvalidImageName   0          11m
rs-d33393-ngw78   0/1       InvalidImageName   0          11m
rs-d33393-vnpdh   0/1       InvalidImageName   0          11m
</code></pre>

<p>After this, i try to edit the image inside replicaset using <strong>kubectl edit replicasets.extensions rs-d33393</strong> and update image as <strong>busybox</strong>.</p>

<p>Now, i am expecting pods to be recreated with proper image as part of replicaset.</p>

<p>This has not been the exact result.</p>

<p>Can someone please explain, why it is so? </p>

<p>Thanks :)</p>

<p>With <code>ReplicaSets</code> directly you have to kill the old pod, so the new ones will be created with the right image.</p>

<p>If you would be using a <code>Deployment</code>, and you should, changing the image would force the pod to be re-created.</p>
