How can i run the kubectl apply command to affect changes on my project

Harihara Sudan:
Hi all, I have one doubt in update the deployment

I have created the deployment and it was like simple-web-project (Node-js-app), i have created it and it was working fine, Now i am updating the image (ie changes done on project), when i use the kubectl apply -f deployment.yaml, It was not updating ,i am getting as deployment.apps/simple-web-project unchanged, so my question is how can i run the kubectl apply command to affect changes on my project (I don’t want to delete the deployment and run again)

Tej_Singh_Rana:
Hello, @Harihara Sudan
You can update image by using kubectl edit command.

Harihara Sudan:
Hi @Tej_Singh_Rana if i use the edit command it was not deploying, i am getting as Edit cancelled, no changes made.

Tej_Singh_Rana:
you are making changes only on image right?

Harihara Sudan:
My question is i want to run the deployment again without changing anything

Harihara Sudan:
yes @Tej_Singh_Rana

Ravi Tripathi:
Hey @Harihara Sudan
This might be the command you are looking for.
kubectl rollout restart deployment/<deployment-name>

Ravi Tripathi:
https://kubernetes.io/docs/reference/kubectl/cheatsheet/|https://kubernetes.io/docs/reference/kubectl/cheatsheet/

Harihara Sudan:
Thanks @Ravi Tripathi