Hi All, Can we remove the existing pod and recreate the same pod using same imag . . .

Manas Sahoo:
Hi All, Can we remove the existing pod and recreate the same pod using same image and update instead of updating in the same running pod by using “kubectl get pod <podname> -o yaml > podname.yaml” as it will be messy if we update in the running pod in the exam ?

Balaji K:
Best is to set image and rollout rt ? Need to make sure what the question is asking since if you delete rollout history will not have the entry.

Manas Sahoo:
@Balaji K If it is a deployment, we can record it, but if it is a only a pod. we can’t set image and rollout.

Balaji K:
kubectl set image can be done even for pod and it will auto update and restart. Rollout is not applicable if its just pod.

Manas Sahoo:
ok, For ex: It will ask a sidecar container to the existing pod along with a volume, in that case what would be best approach to do ?