Hello is there a difference between the following imperatives ? kubectl ceate -f . . .

Mo’een sokkar:
Hello
is there a difference between the following imperatives ?
kubectl ceate -f replicaset-definition.yml
&
kubectl apply -f replicaset-definition.yml

Memo Toro:
Hello. When you create a k8s object via create , k8s will know that it was created through a file. Then if you apply changes you could update the k8s object in that way. You could change multiple times the definition file and then apply it and k8s will allow you. create will always try to create the object and you will get error if there is name clashing and other conflicts involved.

Parth Gandhi:
create https://kubernetes.io/docs/tasks/manage-kubernetes-objects/imperative-config/|(imperative) vs apply https://kubernetes.io/docs/tasks/manage-kubernetes-objects/declarative-config/|(declarative)