kubectl apply and kubectl create both are two different approaches to create resources in Kubernetes cluster environment.
They both create resources from either a file or from STDIN.
Now let8217s go in some detailing and understand how kubectl apply and create differ from each other while implementing.
kubectl create is what we call imperative management. On this approach you tell the Kubernetes API what you want to create replace or delete.
In simpler words create creates a whole new object previously non-existing or deleted.
kubectl apply is part of the declarative management approach where changes that you may have applied to a live object i.e. through scale will be 8220maintained8221 even if you apply other changes to the object.
In simpler words apply 8211 makes incremental changes to an existing object by defining what we need.
News Link: https://linuxhandbook.com/kubectl-apply-vs-create/.
RSS Link: https://linuxhandbook.com/feed/.