Hello evryone! I just started learning kubernetes with udemy course. Could someo . . .

Krzysztof P:
Hello evryone!
I just started learning kubernetes with udemy course.
Could someone explain me what is the difference between:
kubectl apply -f pod.yml
kubectl create -f pod.yml
In solution video of first practical test was used kubectl apply
For updateing image inside the pod definition i used:
kubectl set image pod/<name_pod> <container_name>=<image_name>
Does it mean I can solve the problem in many ways?

Sanjay Kumar:
Yes that is correct.
Updating the image in definition file and apply that file is declarative way.
Where as using kubectl set image to update the image is imperative way.

Krzysztof P:
Thank you!