<p>I have a yaml file which I can use to create pods. I am using the dashboard so I can simply select yaml file and it will create pods. Pod will start the container and container will run the docker image. So now lets say I have done some changes in the docker image and want to deploy it again. For this, I will delete the already running pod and will upload the yaml file.</p>

<p>Instead of deleting and uploading yaml file again, is there any keyword available which will delete the already running pod/deployment and will recreate it.</p>

<p>Thanks</p>

<p>If you are using this for development you might get away with </p>

<pre><code>containers:
- image: my/app:dev
  imagePullPolicy: Always
</code></pre>

<p>With this, whenever your pod is recreated, you will get fresh image version.</p>

<p>That said, you need to use something like Deployment to have a pod restarted automaticaly, and then you can just <code>kubectl delete my-pod-xxxxx-yyy</code> to wipe old one and in few sec get the fresh, current one.</p>

<p>For prod, don't do that please. Just use tagged images and apply changed image to your Deployment with <code>kubectl apply -f my.yaml</code> or preferably something like Helm (but that is more complicated topic for starters)</p>
